Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^4: Searching text files

by aquarium (Curate)
on Sep 16, 2006 at 14:05 UTC ( [id://573335]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Searching text files
in thread Searching text files

forget O(n) etc. the original poster was slurping the whole files into memory, which was the cause of the slowness. grep will match the number in the 3 files (several megs total) in about a second....which surely meets the criteria for response time. the poster is a beginner, so would be best for them to have a one liner with a 1 second response time..rather than complicated code with at best 0.5 second response time.
the hardest line to type correctly is: stty erase ^H

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-25 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found