ginabrant has asked for the wisdom of the Perl Monks concerning the following question:

I need to search thru 1000s of files in a directory for a string OR pattern. Additionally, i need a list of files that contain that string OR pattern. I have used a couple of different routines and have gotten some information, but not the name of the files. any help would be greatly appreciated. cheers, gina

Replies are listed 'Best First'.
Re: search directory for files with string
by toolic (Bishop) on Apr 25, 2014 at 02:54 UTC
Re: search directory for files with string
by zentara (Cardinal) on Apr 25, 2014 at 07:34 UTC
Re: search directory for files with string
by RichardK (Parson) on Apr 25, 2014 at 10:23 UTC

    If you want a perl solution File::Find::Rule has a grep method that will search files for a pattern.