in reply to Scoping the regex memory variables and where do I go next
The output is:"jeffrey" =~ /(.*?)(.)\2(.*)/; print "$1 + $2 + $2 + $3 = $1$2$2$3\n"; { local ($1,$2,$3); print "$1 + $2 + $2 + $3 = $1$2$2$3\n"; "" =~ /(?=)/; print "$1 + $2 + $2 + $3 = $1$2$2$3\n"; }
Sigh. And you can't do a blanket localization -- that's the worst part; I have to know how many $DIGIT variables are in use, so I know how many to localize. That sucks.je + f + f + rey = jeffrey je + f + f + rey = jeffrey + + + =
|
|---|