in reply to Read from a file and replace
Otherwise you are going to have to open a new output file, print to it, then rename the new file to the old file name, which is what the -i switch implicitly does.perl -pi.bak -e 's#\Qhere.company.com/pagedir#there.company.com/#g' fi +le1 file2 etc...
|
|---|