in reply to Newbie Script

open (FILE, ">$filename") to overwrite, open (FILE, ">>$filename") to append.

perlfunc:open

hth,
andy.