Jan Eden wrote:
> 
> R. Joseph Newton wrote:
> 
> >"R. Joseph Newton" wrote: Oooops, sorry, needs a small adjustment, I
> >think:
> >
> >>Jan Eden wrote:
> >>
> >>>
> >>>BTW, accessing $1 like this implies that $1, $2 ... form an array.
> >>>How can it be accessed as a whole?
> >>
> >>my @matches =( /($regex)/g);
> 
> Ok, that should have been obvious. Thank you.
> 
> >To put the regex expressions into list context.
> >
> Doesn't the array on the left already form a list context?

Yes.

> Do I really need the parentheses around the regex part?

No, no parenthesis are required.

my @matches = /$regex/g;


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to