in reply to empty a file
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