in reply to Using read/write to update a file
You will likely need seek, tell, print (with a filehandle argument), and possibly truncate.
Unless the replacement is the same length or shorter (and even then you still might), you will also need to write to a temporary file, and not just the original file, doing a rename after closing both files. If you do not (or if you don't use the Tie::File suggestion above), you risk corruption or truncation of the data file.
--MidLifeXis
|
|---|