close

Perl 函式 - binmode

 

■ 功  能

binmode 可以用二進位的模式來處理檔案

 

 

 

■ 語  法

binmode FILENAME

 

 

 

■ 用  法

在open某個檔案,才可執行它,並進行I/O動作。

若要重設檔案代碼的二進位模式,只能再重新開啟檔案。

binmode 在 unix上沒有作用。

 

 

 

■ 範  例

程式碼

open WP, "$file.wp" or die "Can't open $file.wp: $!\n";

binmode WP;

while (read WP, $buf , 1024) {  . . .  }

 


#關鍵字 Perl 函式 - binmode用法;Perl 函式 - binmode語法;Perl 函式 - binmode範例;

 

 

■ Perl  其它函數

▶ Perl 函式|函數|指令集

 


arrow
arrow
    全站熱搜

    News123 發表在 痞客邦 留言(0) 人氣()