http://qs321.pair.com?node_id=283748


in reply to Re: Deleting a line out of text file
in thread Deleting a line out of text file

...you cannot just edit a file in place...

This has been coming up a lot recently. See Tie::File:

"Tie::File" represents a regular text file as a Perl array. Each element in the array corresponds to a record in the file. The first line of the file is element 0 of the array; the second line is element 1, and so on. The file is not loaded into memory, so this will work even for gigantic files. Changes to the array are reflected in the file immediately.

For an example of changing a file in place using Tie::File, see this node and this node.


cp
----
"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."