sub whatever { local $_; while(<$in>) { # do stuff } }
Even if the loop is not in a sub, localizing $_ can prevent nasty bugs if you decided to wrap the loop in a sub later.
In reply to Re^3: A perverse use of grep
by itub
in thread A perverse use of grep
by eyepopslikeamosquito
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |