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.
In reply to Re: regex; how it works
by ikegami
in thread regex; how it works
by sathiya.sw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |