in reply to Resize a File, without rewrite it!

truncate(FILE, $newlen);

perldoc -f truncate is likely what you want.

Replies are listed 'Best First'.
Re: Re: Resize a File, without rewrite it!
by gmpassos (Priest) on Mar 10, 2003 at 23:38 UTC
    Thanks for the reply! it works. But you need to open your file to append data before:

    open (LOG,">>$file") ; truncate(LOG, 3); close (LOG) ;

    Graciliano M. P.
    "The creativity is the expression of the liberty".