AFAIK, the OP wanted to apply the regex to the contents of the files, not the names, so it should be:
my @files = File::Find::Rule->grep( qr/regex/ )->in( @dirs );
In reply to Re^2: File::Find: Return array of "wanted" files (File::Find::Rule)
by hdb
in thread File::Find: Return array of "wanted" files
by alpha-lemming
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |