$_= "foobar"; /(oo)/; my $out= \$1; my $in; { /(ar)/; $in= \$1; } print "in=out\n" if $in == $out;