If you want something in $_, put it in $_.
#!/usr/bin/perl testy() for 'i am a nice parameter'; sub testy { print "$_\n"; }
I used for to assign in order to $_ to protect the previous value of $_. Clobbering your caller's $_ is a bad idea.
In reply to Re: File::Find and $_ in the wanted sub
by ikegami
in thread File::Find and $_ in the wanted sub
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |