in reply to Grep file out of directory and read into array
I find File::Find::Rule much easier to use that File::Find and for this case even has a grep method.
So you code to get the file-names containing your pattern(s) could look something like this (untested )
my @files = File::Find::Rule->file() ->name( '*.dpt' ) ->grep( $pattern ) ->in( $dir );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Grep file out of directory and read into array (find/rule)
by Anonymous Monk on Dec 08, 2014 at 19:04 UTC |