Perl Programming/Keywords/truncate

Previous: tr Keywords Next: uc

The truncate keyword

edit

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

edit
  truncate FILEHANDLE, LENGTH
  truncate EXPRESSION, LENGTH
Previous: tr Keywords Next: uc