Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: remove lines matching list of strings

by roboticus (Chancellor)
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


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.


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

Comment on Re: remove lines matching list of strings

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2015-10-10 00:31 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (254 votes), past polls