in reply to Resize a File, without rewrite it!
truncate(FILE, $newlen); [download]
perldoc -f truncate is likely what you want.
open (LOG,">>$file") ; truncate(LOG, 3); close (LOG) ; [download]
Graciliano M. P. "The creativity is the expression of the liberty".