Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Large scale search and replace with perl -i

by Abigail-II (Bishop)
on Apr 14, 2003 at 19:09 UTC ( [id://250379]=note: print w/replies, xml ) Need Help??


in reply to Re: Large scale search and replace with perl -i
in thread Large scale search and replace with perl -i

If there are many files that will not have a match, this might actually be faster, because you will save on IO writes. The perl -i will always write to a new (temporary) file, even if it turns out the content is the same - after all, Perl can't know there isn't a match. So, you will do more IO writes, and your OS goes twice as fast through its buffer cache.

It's hard to say whether a grep is worthwhile. Without knowing more about the content of the files, I won't dismiss it.

Abigail

  • Comment on Re: Large scale search and replace with perl -i

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 23:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found