In the case of $_, the rule of thumb is to treat it as a global that will pollute calling code except where you specifically know it won't, e.g. foreach, map, and grep.
In 5.9.1, you can lexicalize $_.
In reply to Re^3: detecting changes in a localised variable
by gaal
in thread detecting changes in a localised variable
by Tanktalus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |