On 9/12/07, Andrew Curry <[EMAIL PROTECTED]> wrote: > providing you match works you need () around the pattern > > i.e. > > @matches = ( $string =~ m/ expression /xgsi ); > otherwise it just returns the scalar result it believe i.e. the number of > matches snip
You don't need the parens around the match, you need parens inside the pattern (aka captures). Assigning to an array already puts the match in list context and adding parens to the right hand side of an assignment has no effect on the context (unless you are taking a slice of the list, in which case it will put the regex in list context). -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/