Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Strange behavior in File::Find (stopped working for no reason)by choroba (Cardinal) |
on Apr 12, 2021 at 16:58 UTC ( [id://11131150]=note: print w/replies, xml ) | Need Help?? |
Let's read the documentation.
Your preprocess subroutine, hi, returns an empty list, so there are no files too iterate over. Why wasn't the preprocess subroutine called before wanted? Because the directory argument to find() is not preprocessed, wanted is run on it directly. Only the directories' contents that are subject to readdir are preprocessed.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|