This is often done using a single line interface:
perl -pi.bak -e "s/find/replace/g" <file>
Note the -i.bak part - this creates a backup file with the extension .bak . If you want to play without a network, you can do this to overwrite an existing file without a backup:
perl -pi -e "s/find/replace/g" <file>
Michael Carman Jun 01 '09 at 13:12 2009-06-01 13:12
source share