Also, a good part of Perl's operators and functions will modify $_ in some way. Even if you don't use it, a function you call might, and it'll get changed. This leads to hard-to-debug code of the worst kind...
Reserve use of $_ to shell one-liners and map/grep blocks. The rest of the time assign your own variable.
In reply to Re^2: Which way is recommended ?
by DStaal
in thread Which way is recommended ?
by matrixmadhan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |