As of Perl 5.7.0 this behaviour has changed for $1 and friends. From perl570delta:
The regular expression captured submatches ($1, $2, ...) are now more consistently unset if the match fails, instead of leaving false data lying around in them.
ihb
Read argumentation in its context!
In reply to Re^2: You *Can* Catch errors in closing lexical filehandles
by ihb
in thread Catching errors in closing lexical filehandles
by gaal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |