in reply to Replace a line with a new one

To just write the data to a file and overwrite what's in there, replace
open (FILE,">>external.txt");
with
open (FILE,">external.txt");

Replies are listed 'Best First'.
Re: Re: Replace a line with a new one
by Donnie (Acolyte) on Oct 14, 2002 at 21:30 UTC
    That's a good thought, Steve. Unfortunately, that does not work. The data is added to the old file before it is written into "external.txt" - as "external.txt" is just the temporary file. Wish it were that simple. Thanks for responding, however. I appreciate it a lot!