The bottom line is $_ is Perl magic. No amount of waving wands, shaking them vigorously or banging them on the table top will dispel the underlying magic that is $_.
Much subtle stuff happens with $_ in map, foreach and grep. A comment that describes any relevant and important magic in each case may be more useful to newcomers to the language than trying to paper over the good magic that $_ provides.
In reply to Re: How to avoid $_ in grep
by GrandFather
in thread How to avoid $_ in grep
by felipe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |