Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^3: Regexp not capturing in named subrules (leftmost)by tye (Sage) |
on Sep 16, 2009 at 03:13 UTC ( [id://795512]=note: print w/replies, xml ) | Need Help?? |
Since the "leftmost defined buffer" is inside of a group quantified by {0}, it isn't puzzling to me that this buffer didn't match. And it isn't surprising that a buffer that didn't match doesn't capture anything. Perhaps you were now expecting thing => undef, contrary to your previously stated expectation? If so, my limited testing shows that %+ keys aren't pre-populated but the values are returned by magic (%+ always appears empty even when $+{moo} returns "o" after 'cow' =~ /(?<moo>o+)/). Update: I'm glad to report that the lack of keys in %+ appears to have only been an effect of the quick-hack method I used to test, related to evaluation order problems. - tye
In Section
Seekers of Perl Wisdom
|
|