"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.
In reply to Re: Another regex variable puzzle
by archon
in thread Another regex variable puzzle
by Rudif
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |