Just another Perl shrine | |
PerlMonks |
Re: Large scale search and replace with perl -iby Abigail-II (Bishop) |
on Apr 14, 2003 at 19:09 UTC ( [id://250379]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|