7stud has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
Is it possible to use File::Find::Rule's grep() method to print out the matching line? It seems redundant to find all the files that contain a match, then re-open each file to search for the matching line again to output it. It seems logical to me that File::Find:Rule's grep() would pass the matching line to a subroutine along with the file name, etc. But then again File::Find::Rule quits searching the file after the first matching line, so the search is incomplete anyway.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File::Find::Rule grep()
by Anonymous Monk on Jan 26, 2013 at 06:11 UTC | |
|
Re: File::Find::Rule grep()
by 7stud (Deacon) on Jan 26, 2013 at 06:19 UTC | |
by Anonymous Monk on Jan 26, 2013 at 08:11 UTC | |
by Anonymous Monk on Jan 26, 2013 at 08:16 UTC |