good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
empty a fileby GS (Acolyte) |
on Jun 27, 2004 at 15:58 UTC ( [id://369976]=perlquestion: print w/replies, xml ) | Need Help?? |
GS has asked for the wisdom of the Perl Monks concerning the following question:
Dears monks, how do I empty the contents of a text file in perl, I have to delete evrything from a file before updating it. Thanks in advance. Forgot to mention that I am oprning this file in append mode open HANDLE,">>","/path/to/file" or die "Cannot overwrite file: $!"; Initially at open I need to delete all contents.
Back to
Seekers of Perl Wisdom
|
|