Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: remove lines matching list of strings

by roboticus (Canon)
on Nov 08, 2012 at 21:37 UTC ( #1002993=note: print w/ replies, xml ) Need Help??


in reply to remove lines matching list of strings

rootcho:

The fastest way? If you're on a unix box, I'd try using grep. It's specialized for that sort of task.

If you just want to do it with perl, I think reading the entire file into a scalar and then building the giant regex may be the fastest. But you may want to use Benchmark and test to find out what's fast or not.

...roboticus

When your only tool is a hammer, all problems look like your thumb.


Comment on Re: remove lines matching list of strings

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2014-07-30 19:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (240 votes), past polls