unlink will delete the file. The filename will no longer exist in a
directory listing also.

open FILE ">file.txt";
# You can then print to file.txt if you wish.
# If you do not write to the file, its size will be ZERO

system ("echo >file.txt")
# works also but size of the file is 1 byte

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 10:25 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Deleting the contents of a file


perldoc -f unlink

-----Original Message-----
From: Allison Ogle [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 10:26 AM
To: [EMAIL PROTECTED]
Subject: Deleting the contents of a file


Hi,

I want to opena datafile and erase it's all it's contents.  Can anyone help?
Thanks,

Allison


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to