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
 

Reply via email to