To append to a file, you must open() the file, like so:
open(OUTFILE,myfile.txt) || die Could not open myfile.txt
for appending!\n;
Then when you want to write to the file, use print(), like so:
print OUTFILE The text I want to add to the end of my file\n;
-Original
At 09:10 AM 12/5/2001 +0800, louie miranda wrote:
open(INFO, $file);
$file has a value, right?
Add this:
open(OUTFILE, $append) or die Can't open
file:$!\n; #this is assuming you've assigned a file name to $append
@lines = INFO;
close(INFO);