h2 has asked for the wisdom of the Perl Monks concerning the following question:
I'm clearly missing something here. All examples run with use strict/warnings
If I load File::Find with:
use strict; use warnings; use File::Find;
the following error goes away:
Name "File::Find::prune" used only once: possible typo at...But if I use:
Require File::Find; File::Find->import(qw(find));
the error appears. I am confused by this. Due to a decision by fedora/redhat to remove File::Find from core modules, the Require loading is required, not my choice unfortunately.
In &wanted, I'm trying to prune a directory, following examples and explanations from for example here and in particular here.
This is a simplified example, but shouldn't matter since it's the single occurrence of $File::Find::prune = 1 that is making Perl complain.sub wanted { if ($File::Find::name =~ m%^/path/detection%){ $File::Find::prune = 1; return; } }
Back to
Seekers of Perl Wisdom