Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Searching pattern in 400 files and getting count out of each file

by space_monk (Chaplain)
on Nov 08, 2012 at 10:31 UTC ( #1002870=note: print w/ replies, xml ) Need Help??


in reply to Re: Searching pattern in 400 files and getting count out of each file
in thread Searching pattern in 400 files and getting count out of each file

The original posting also (through the grep) reads each file for every pattern. i.e. it opens every single file (400 of them) 8000 or so times. Look at strategies to just read each file once; another reply on this thread seems to have implicitly done this, without clarifying why, and it also misses the opportunity to tidy up the patterns outside the file read loop.

A Monk aims to give answers to those who have none, and to learn from those who know more.


Comment on Re^2: Searching pattern in 400 files and getting count out of each file

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1002870]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2014-07-24 06:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (158 votes), past polls