> 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> 
b) cp /dev/null <filename>
c) cat /dev/null > <filename>

Perl:
Open file in write+ mode as,

open <File-Handle>,>+ "Filename";

hth.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to