|laziness, impatience, and hubris|
File::Find::Rule grep()by 7stud (Deacon)
|on Jan 26, 2013 at 04:41 UTC||Need Help??|
7stud has asked for the
wisdom of the Perl Monks concerning the following question:
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.