|Just another Perl shrine|
Perl and or Grep Help!by Anonymous Monk
|on Jan 17, 2011 at 20:21 UTC||Need Help??|
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I need to go through large directories and search all the Perl scripts for the word "email" in them. But I cant get the command to search recursively, it works if I specify a directory, but even using "-r" it is not doing what I expected. Here is the code, if anyone would give me a better way it would be really nice.
This other code its actually better because it gives me the line number where it found the word "email", but again it cant search recursively through all directories. It would be nice if I could get with this:
A file with results something like:
dir1/dir2/dir3/ file1.pl:230 email
dir_a test.pl:44 email
If anyone has done something like that and would like to share some knowledge it would help me a lot! Thanks!