< Perl Programming < Keywords

The truncate keyword

truncate shortens the contents of the file that is opened on FILEHANDLE, or that is named by EXPRESSION, to the specified LENGTH. Raises an exception if truncate isn't implemented on your system and returns true if successful, undef on error.

Syntax

  truncate FILEHANDLE, LENGTH
  truncate EXPRESSION, LENGTH
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.