Re: 問幾個新手的問題orz

看板Perl作者 (^u*s)時間18年前 (2005/11/03 02:22), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/6 (看更多)
※ 引述《Dancer31 (:p)》之銘言: : 剛開始學perl 覺得它真是種隨性的語言阿XD : 不過碰到了一些問題 麻煩大家幫一下吧@@ : 1. 開檔我只會用 open FILE, "<input.txt"; : 可是規定要在cmd輸入perl xxx.pl < input.txt 我是超級新手(只學了一個晚上Orz) 你說的是這個嘛? open(INFILE, "input.txt") or die "Can't open input.txt: $!"; open(OUTFILE, ">output.txt") or die "Can't open output.txt: $!"; open(LOGFILE, ">>my.log") or die "Can't open logfile: $!"; my $line = <INFILE>; my @lines = <INFILE>; -- 外星人開相簿? 有搞頭嗎? http://www.wretch.cc/album/selfstrike (since2005/1/20PM5:49) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.114.55.81
文章代碼(AID): #13QGFQ7z (Perl)
討論串 (同標題文章)
文章代碼(AID): #13QGFQ7z (Perl)