wackattack has asked for the wisdom of the Perl Monks concerning the following question:
What is the best way to quickly and easily open a file, edit a single line (with s/<old>/<new>/), and then save?
As of right now I will open the file and then save an edited version under a different name. Then I will delete the original file and then rename the new-edited version so it will take the place of the now deleted original file.
Is there a quicker way to do this? Or is the use of a temp file the only way to get this done?
As of right now I will open the file and then save an edited version under a different name. Then I will delete the original file and then rename the new-edited version so it will take the place of the now deleted original file.
Is there a quicker way to do this? Or is the use of a temp file the only way to get this done?
Back to
Seekers of Perl Wisdom