in reply to Re: Value of $_ inside a regex
in thread Value of $_ inside a regex

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.
  • Comment on Re^2: Value of $_ inside a regex (?{ code })

Replies are listed 'Best First'.
Re^3: Value of $_ inside a regex (?{ code })
by Discipulus (Canon) on Oct 12, 2015 at 08:27 UTC
    so that part is documented; good to know.

    L*
    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re^3: Value of $_ inside a regex (?{ code })
by AnomalousMonk (Archbishop) on Oct 12, 2015 at 20:16 UTC

    I see this statement in the documentation of  (?{...}) in perlre back to 5.8.9. But nothing like it for  (??{...}) Interesting.


    Give a man a fish:  <%-{-{-{-<