##
inner: d e
outer: d e
####
$_ = "abcde";
if (/(.)(.)/) { # first two
{ # ADDED
if (/(.)(.)$/) { # last two, by your theory won't upset
print "inner: $1 $2\n";
}
} # ADDED
# by your theory, should see first two again
print "outer: $1 $2\n";
}
####
inner: d e
outer: a b