the program i am working on is designed to open a file, read one line at a time..perform some substitutions and write the changed line back to disk. what would be the best way to do this? opening the file, and using a while loop to change one line at a time and then print it back to the filehandle...but how do you make one line replace another in the original file? or would opening a second empty file and printing the new lines to that make more sense? sorry for being so vague...any help would be greatly appreciated.
Edited 2001-04-24 by mirod: changed the title.
In reply to In-place editing of files (was: general perl question) by cghost23
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |