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...
In reply to Re: Read from a file and replace
by runrig
in thread Read from a file and replace
by toddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |