You'll need a (package) global array to push results onto. That is one thing that many dislike about File::Find. You can localize it and pass it out to a lexical if you like,
my @found_array = do { local @found; find \&wanted, $dir; @found }; sub wanted { no strict 'vars'; push @found, $_ # if . . . }
After Compline,
Zaxo
In reply to Re: How to get File::Find to return a list?
by Zaxo
in thread How to get File::Find to return a list?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |