[問題] format與write

看板Perl作者 (薰)時間18年前 (2007/09/04 15:56), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
想用格式化輸出檔案, 不過都只能print在cmd window上 什麼方法才可以寫到檔案裡去呢? 附上code #!usr/bin/perl format STDOUT_TOP= Pname Max Min Avg Std Stdplus Stdless ================================================================================ . format STDOUT= @>>>>>>>> @##### @#### @#####.#### @#####.#### @#####.#### @#####.#### $_[0],$_[1],$_[2],$_[3],$_[4],$_[5],$_[6] . open f,"+<c:\\test\\1\\stastical3.txt"; while(<f>){ chomp; split(/\s+/); unshift @value,$_; ($_[0],$_[1],$_[2],$_[3],$_[4],$_[5],$_[6])=split/\s+/; write ; } close f; -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.65.55.161

09/05 12:21, , 1F
用select?
09/05 12:21, 1F
文章代碼(AID): #16tG_BJK (Perl)
文章代碼(AID): #16tG_BJK (Perl)