To write to a file you would use something like:

open (FILEHANDLE, ">FILENAME");

this command will overwrite anything that already exists in this file or
create a new file if one doesn't already exist.

Or you could use

open (FILEHANDLE, ">>FILENAME");

this will open (or create) the file for appending i.e. adding stuff to the
end of the file.
Hope this helps, :)

Regards,

Sally

-----Original Message-----
From: bdale16 [mailto:[EMAIL PROTECTED]]
Sent: 12 June 2001 02:52
To: [EMAIL PROTECTED]
Subject: how to create a file


I want a perl program when executed to send the data to a file such as
text.txt but i dont need to open the file first.
 apparently i don't understand what the command is to  do this

 If it is  open close or write ?
 any suggestions on the right command to use and the yntex so i can
experiment with saving data created in pearl programs to files


Reply via email to