in reply to How to avoid $_ in grep

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.


Perl is environmentally friendly - it saves trees