in reply to Re^2: File::Find: Return array of "wanted" files (File::Find::Rule)
in thread File::Find: Return array of "wanted" files
AFAIK, the OP wanted to apply the regex to the contents of the files, not the names, so it should be:
Go figure, I thought it was a typo, oh well :)
use File::Find::Rule qw/ find /;
my @files = find( file => grep => qr/regex/, in => \@dirs, );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: File::Find: Return array of "wanted" files (File::Find::Rule)
by alpha-lemming (Novice) on Oct 04, 2013 at 09:53 UTC |