in reply to find and replace

A simple way to do this would be to use Tie::File. It is one of the core modules in the Perl distribution, so you would not have to install anything extra. Here is a snippet from a script I wrote using Tie::File:
tie @ThisFile, 'Tie::File', 'c:/index.html'; foreach(@ThisFile) {s/$SearchText/$ReplaceText/g}; untie @ThisFile;

Replies are listed 'Best First'.
Re^2: find and replace
by Anonymous Monk on Jun 21, 2005 at 15:26 UTC
    thanks, this works great.