P is for Practical | |
PerlMonks |
Re: empty a fileby l3nz (Friar) |
on Jun 27, 2004 at 20:03 UTC ( [id://370033]=note: print w/replies, xml ) | Need Help?? |
Either you open the file in append mode or you truncate the file. The two thing don't logically go together.
Why don't you simply open the file in non-append mode? you'd get the same result as truncate plus append.
In Section
Seekers of Perl Wisdom
|
|