...and you can also be defensive and protect yourself from other code that isn't as nice:
though if you find yourself doing that I strongly suggest you just switch to using my $var instead of $_. - tye (but my friends call me "Tye")sub mine { local( $_ ); while( <FILE> ) { s/this/that/g; { local( $_ )= $_; yours( $_ ); } s/that/this/g; }
In reply to (tye)Re: localization of $_
by tye
in thread localization of $_
by modred
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |