in reply to Re: cleaning out a file in thread cleaning out a file
Yes, I think this is the safest way.
close FH if open FH, ">".$filename
But overwrite mode might do an unlink/link combo. (meaning that the file
$filename might be deleted, then recreated as a empty file). So this could be the same
asunlink $filename; open ">$filename";
I am not sure. Anybody actually know if there is a difference?
The file inode number should still be the same though for either method.
Depending on what you are doing this is probably good enough.
|