[Chapter 3] 3.2.176 truncate
Author: Larry Wall, Tom Christiansen & Randal L. Schwartz
Date: 1999-07-02T01:55:50Z

#

| Chapter 3 Functions |

### 3.2.176 truncate

    truncate FILEHANDLE, LENGTH
    truncate EXPR, LENGTH

This function truncates the file opened on `FILEHANDLE`, or named by `EXPR`, to the specified length. The function produces a fatal error if truncate(2) or an equivalent isn't implemented on your system. (You can always truncate a file by copying the front of it, if you have the disk space.)

3.2.175 tr/// |  | 3.2.177 uc