Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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]
[choroba]: The previous line tells it all.
[choroba]: "Out of memory!" - anything can happen afterwards
[Discipulus]: my father sometimes gives the same result.. good fellow

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2018-02-21 13:55 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (280 votes). Check out past polls.