in reply to Getting Filenames that contains a particular string recursively From a Directory
I guess that File::Find::Rule is what you want:
use File::Find::Rule; my $directory = "/home/Modules"; my @files = File::Find::Rule ->name(qr/\.pm$/) ->grep('user_method') ->in($directory);
Update: Fixed formatting error, spotted by frodo72
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |