I don't have your blanket aversion to the use of globals -- they are just another tool in the toolbox, applicable for some purposes and not others -- but if I did, I'd deal with it this way:
sub buildFileHash { my $root = shift; my %filesBySize; find { ... push @{ $filesBySize{ -s() } } }, $File::Find::name; ... } $root; \%fileBySize; }
In reply to Re: Question about alternative to File::Find
by BrowserUk
in thread Question about alternative to File::Find
by swampyankee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |