in reply to RE: Re: Scope of regular expression variables
in thread Scope of regular expression variables

I'm not sure whether I disagree or not. To wit:
$_ = "abcde"; if (/(.)(.)/) { # first two if (/(.)(.)$/) { print "inner: $1 $2\n"; } print "outer: $1 $2\n"; } print "outer: $1 $2\n";
$1 and $2 aren't localized within the if block -- unless the regex is also within the same enclosing block.

(At least, that makes it more explicit.)