"[EMAIL PROTECTED]" wrote:

> the memory variables $1 - $9 i think are odd. 

Yeah, me too. you can use regular expressions
in list context to capture the matches though:

my @matches = $str=~/(patt)(patt2)(patt3)/;

the only caveat is that this will NOT update
the \G anchor or the value returned by pos($str).

I filed a perlbug on this, but claims that this
would break backward compatibility were given
as a reason to not change this 'feature'.

what I ended up doing was 
doing the regular expression in array context,
and then creating a string in a for loop
        push(@matches, $1);
where "$1" was the match variable I wanted,
and then doing an eval on the string.

If you don't need \G, then just use the regexp
in list context though.

Greg

Reply via email to