Perl truncate 函式



說明

此函式截斷(減小)FILEHANDLE 指定的檔案的大小至指定的大(以位元組為單位)。如果系統未實現該函式,則會導致致命錯誤。

語法

以下是此函式的簡單語法:

truncate FILEHANDLE, LENGTH

返回值

如果操作失敗,則此函式返回 undef,否則返回 1。

perl_function_references.htm
廣告
© . All rights reserved.