Perl truncate Function



Description

This function truncates (reduces) the size of the file specified by FILEHANDLE to the specified LENGTH (in bytes). Produces a fatal error if the function is not implemented on your system.

Syntax

Following is the simple syntax for this function −

truncate FILEHANDLE, LENGTH

Return Value

This function returns undef if the operation failed and 1 on success.

perl_function_references.htm
Advertisements