in reply to regex; how it works

The match operator in list context returns the captures. This is actually documented in perlop. (Not in perlre, which documents regexp patterns.)

why can't it store the $=$ into the variable ?

What makes you think it can't? If you're not capturing the right thing, move the parens to capture the right thing.

Replies are listed 'Best First'.
Re^2: regex; how it works
by sathiya.sw (Monk) on Feb 28, 2009 at 09:36 UTC
    This clarifies me "The match operator in list context returns the captures." .. Thanks.
    Sathiyamoorthy