alpha-lemming has asked for the wisdom of the Perl Monks concerning the following question:
How can I get list of matching files into an array inside of the foreach loop? Thanks!sub findstuff { my $file = $File::Find::name; return unless -f "$file"; if (fgrep { /regex/ } "$file") { print "Found regex in $file\n"; } } foreach (@dirs) { find(\@findstuff, $_); }
|
|---|