more useful options | |
PerlMonks |
Re^2: Value of $_ inside a regex (?{ code })by Anonymous Monk |
on Oct 12, 2015 at 08:10 UTC ( [id://1144488]=note: print w/replies, xml ) | Need Help?? |
Aha, so we're talking about a specific construct, the http://perldoc.perl.org/perlre.html#%28?{-code-}%29, which says inside a (?{...}) block, $_ refers to the string the regular expression is matching against. You can also use pos() to know what is the current position of matching within this string.
In Section
Seekers of Perl Wisdom
|
|