Re: Emptying a log file....

2005-08-12 Thread Octavian Rasnita
Hi, See: perldoc -f truncate Teddy - Original Message - From: Tony Frasketi [EMAIL PROTECTED] To: beginners@perl.org Sent: Friday, August 12, 2005 2:33 AM Subject: Emptying a log file Hello Listers Is there any way in perl to effectively clear the contents

Re: Emptying a log file....

2005-08-12 Thread Octavian Rasnita
Or... another non-perl solution: echo log.txt Teddy - Original Message - From: Bryan R Harris [EMAIL PROTECTED] To: Beginners Perl beginners@perl.org Sent: Friday, August 12, 2005 2:54 AM Subject: Re: Emptying a log file Not a perl solution, but: cp /dev/null myfile

Re: Emptying a log file....

2005-08-12 Thread Tony Frasketi
Hello Listers Thanks very much for all the suggestions for solving my problem with clearing out my log file I've followed the suggestion by [EMAIL PROTECTED] and it does the job for me... --- open FD, filename; --- What a

Emptying a log file....

2005-08-11 Thread Tony Frasketi
Hello Listers Is there any way in perl to effectively clear the contents of an ***existing*** file (making the file empty) ? I have a log file that I'd like to empty out after it reaches a certain maximum file size. thanks in advance Tony -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Emptying a log file....

2005-08-11 Thread Binish A R
Tony Frasketi wrote: Hello Listers Is there any way in perl to effectively clear the contents of an ***existing*** file (making the file empty) ? I have a log file that I'd like to empty out after it reaches a certain maximum file size. thanks in advance Tony just opening

Re: Emptying a log file....

2005-08-11 Thread Wijnand Wiersma
2005/8/11, Binish A R [EMAIL PROTECTED]: Tony Frasketi wrote: Hello Listers Is there any way in perl to effectively clear the contents of an ***existing*** file (making the file empty) ? I have a log file that I'd like to empty out after it reaches a certain maximum file size.

Re: Emptying a log file....

2005-08-11 Thread Bryan R Harris
Not a perl solution, but: cp /dev/null myfile - B Hello Listers Is there any way in perl to effectively clear the contents of an ***existing*** file (making the file empty) ? I have a log file that I'd like to empty out after it reaches a certain maximum file size. thanks in

Re: Emptying a log file....

2005-08-11 Thread Chris Devers
On Thu, 11 Aug 2005, Binish A R wrote: Tony Frasketi wrote: Hello Listers Is there any way in perl to effectively clear the contents of an ***existing*** file (making the file empty) ? I have a log file that I'd like to empty out after it reaches a certain maximum file size.

Re: Emptying a log file....

2005-08-11 Thread Jeff 'japhy' Pinyan
On Aug 11, Tony Frasketi said: Is there any way in perl to effectively clear the contents of an ***existing*** file (making the file empty) ? I have a log file that I'd like to empty out after it reaches a certain maximum file size. The truncate() function, which takes a filename OR a

Re: Emptying a log file....

2005-08-11 Thread Muthukumar
Is there any way in perl to effectively clear the contents of an ***existing*** file (making the file empty) ? I have a log file that I'd like to empty out after it reaches a certain maximum file size. You can to check the file size and empty the file easily as, Shell actions: a) filename