Cari di Perl 
    Perl User Manual
Daftar Isi
(Sebelumnya) Get current seekpointer on a d ...Print debugging info (Berikutnya)
Input and output functions

Shorten a file

Daftar Isi

  • truncate FILEHANDLE,LENGTH

  • truncate EXPR,LENGTH

    Truncates the file opened on FILEHANDLE, or named by EXPR, to thespecified length. Raises an exception if truncate isn't implementedon your system. Returns true if successful, undef on error.

    The behavior is undefined if LENGTH is greater than the length of thefile.

    The position in the file of FILEHANDLE is left unchanged. You may want tocall seek before writing to the file.

    Portability issues: truncate in perlport.

 
Source : perldoc.perl.org - Official documentation for the Perl programming language
Site maintained by Jon Allen (JJ)     See the project page for more details
Documentation maintained by the Perl 5 Porters
(Sebelumnya) Get current seekpointer on a d ...Print debugging info (Berikutnya)