in reply to Another regex variable puzzle
"Not saving $1, $2, and so on, across regular expressions. Remember that every new m/atch or s/ubsti/tute/ will set (or clear, or mangle) your $1, $2... variables, as well as $`, $', and $&..."
I imagine Perl has to do this in order for backreferences, e.g. /blah(\w+)blah\1/, to work.
|
|---|