in reply to The easiest way to substitute a part of the content of a file.
(Use " instead of ' on Windows.)perl -pi.bak -e 's/content/newcontent/g' fileloc
For longer programs, you really do need to read it, manipulate a string, then write it again.
|
|---|