> $search =
> standard_search(Call Log) .
> standard_search(Billing Log) .
> standard_search(My Account) .
> standard_search(Help) .
> standard_search(Calling Plans);
>
> s{ $search } { $3 $1 $2 $5 $4 }gx;
Thank you! That is exactly what I needed to know in order to get the
subroutine working.
--
Noah Sussman
Senior Web Developer
Deltathree, The IP Communications Network
75 Broad St, 31st Floor
New York, NY 10004
tel 212-500-4845
fax 212-500-4888
[EMAIL PROTECTED]
www.deltathree.com
"A foolish consistency is the hobgoblin of little minds."
-- Emerson
> From: "Me" <[EMAIL PROTECTED]>
> Date: Wed, 27 Jun 2001 16:25:00 -0500
> To: "Noah Sussman" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
> Subject: Re: subroutine as search string?
>
> s/// and friends first parse their contents as double
> quoted strings, before ever considering the content
> as a regex.
>
> So you can do:
>
> $foo = '[a-';
> $bar = 'z]';
>
> s/$foo$bar//gi;
>
> and it will work (stripping letters).
>
> Furthermore, you don't need any dynamic behavior
> for the search part of the s///, so it's fair to view it as
> just a string, with subs being used to make a var
> that contains the string.
>
> Enough preamble.
>
> One way is to keep your sub, but use it this way:
>
> $search =
> standard_search(Call Log) .
> standard_search(Billing Log) .
> standard_search(My Account) .
> standard_search(Help) .
> standard_search(Calling Plans);
>
> s{ $search } { $3 $1 $2 $5 $4 }gx;
>
> hth.
>