There is always no warnings 'once';. My personal preference is to use this locally to the error, so that you cam still detect inadvertent cases of this elsewhere in your code.
sub wanted { if ($File::Find::name =~ m%^/path/detection%){ no warnings 'once'; $File::Find::prune = 1; return; } }
Don't worry about adding execution time to your subroutine; this pragma is applied at compile time.
In reply to Re: Why $FIle::Find::prune = 1 returns used only once error
by Anonymous Monk
in thread Why $FIle::Find::prune = 1 returns used only once error
by h2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |