Open it for read-write access (see perlopentut), seek to the beginning of the file, and then truncate.
(Of course were you on a real OS I'd suggest just cp /dev/null logfile, but I have no idea if Cygwin or using NUL: would accomplish the same thing).
In reply to Re: Cleaning file
by Fletch
in thread Cleaning file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |