Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2014-08-28 10:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (259 votes), past polls