RE: Deleting the contents of a file

2002-04-11 Thread Hooten, Michael
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 [mail

Re: Deleting the contents of a file

2002-04-11 Thread Jeff 'japhy' Pinyan
On Apr 11, Allison Ogle said: >I want to opena datafile and erase it's all it's contents. Can anyone help? No need to open the file. truncate($path_to_file, 0); -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.or

RE: Deleting the contents of a file

2002-04-11 Thread A Taylor
Hi, I am very new to PERL but if all you want to do is open an existing file and delete all of it's contents you could open the file for writing and then close it. open(F, ">filename"); close (F); There maybe a more acceptable way to do this - but this should open the file - remove its conten

RE: Deleting the contents of a file

2002-04-11 Thread Kipp, James
cat /dev/null >datafile > -Original Message- > From: Nikola Janceski [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 11, 2002 10:33 AM > To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: Deleting the contents of a file >

RE: Deleting the contents of a file

2002-04-11 Thread Nikola Janceski
I think... open(DATA, ">$file") or die "cannot open: $!"; would do the trick. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 11, 2002 10:25 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subjec

RE: Deleting the contents of a file

2002-04-11 Thread RArul
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

Deleting the contents of a file

2002-04-11 Thread Allison Ogle
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]