Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: replacing string in multi-line text file

by apl (Monsignor)
on Mar 25, 2011 at 10:49 UTC ( #895444=note: print w/ replies, xml ) Need Help??


in reply to replacing string in multi-line text file

From a purely religious point of view, you don't want to update the source file. Rather, you want to create a new file that reflects the changes to the original file. Upon successful completion, you can then rename the original file to something else, and the new file to the original name.

That way, you can always fall back to the source input file and avoid disaster.


Comment on Re: replacing string in multi-line text file

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://895444]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (9)
As of 2014-07-22 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (130 votes), past polls