Oops, I think you are a bit confused...
'>' will overwrite the file NOT append.
You want '>>' to append.
Brent
Andrew Prueser
<aprueser@fairchil To: [EMAIL PROTECTED]
dsemi.com> cc:
Subject: RE: create a new file
06/01/01 11:13 AM
open(FILEHANDLE, ">filename")
the '>' indicates open for append, or create if doesn't exist.
checkout 'perldoc -f open' for all the fun things you can do with open.
Andrew
-----Original Message-----
From: Nichole Bialczyk [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 01, 2001 12:10 PM
To: [EMAIL PROTECTED]
Subject: create a new file
ok, so i know how to write to an existing file, how do i create the file,
if it doesn't exist? i want to do something like,
pseudocode -- ewww!
if the file exists{
write to it
}
if the file does not exist{
create it
write to it
}
close the file