http://www.perlmonks.org?node_id=418843


in reply to append text to existing file

You want >> not >

open F, ">$file" or die "Can't create/overwite $file $!\n"; open F, ">>$file" or die "Can't append to $file $!\n";

cheers

tachyon