看板 [ Perl ]
討論串問幾個新手的問題orz
共 6 篇文章
首頁
上一頁
1
2
下一頁
尾頁

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者Dancer31 (:p)時間18年前 (2005/10/29 02:00), 編輯資訊
2
0
0
內容預覽:
剛開始學perl 覺得它真是種隨性的語言阿XD. 不過碰到了一些問題 麻煩大家幫一下吧@@. 1. 開檔我只會用 open FILE, "<input.txt";. 可是規定要在cmd輸入perl xxx.pl < input.txt. 2. 想請問怎樣直接讀字元. 我用. while (<FILE

推噓1(1推 0噓 0→)留言1則,0人參與, 最新作者dtohuy (太公望)時間18年前 (2005/10/29 14:46), 編輯資訊
2
0
0
內容預覽:
使用他搜尋的功能~~. 用正規表示式直接抓出想要的字元字串吧 XDXD. --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 140.113.55.177.

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者SelfStrike (^u*s)時間18年前 (2005/11/03 02:22), 編輯資訊
1
0
1
內容預覽:
我是超級新手(只學了一個晚上Orz). 你說的是這個嘛?. open(INFILE, "input.txt") or die "Can't open input.txt: $!";. open(OUTFILE, ">output.txt") or die "Can't open output.txt
(還有93個字)

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者Dancer31 (:p)時間18年前 (2005/11/03 03:59), 編輯資訊
0
0
0
內容預覽:
後來發現我們助教有講方法@@". while( $str = <> ). {. print "$str";. }. #執行perl test.pl < WebPL.txt. #這樣會把WebPL.txt當stdin讀進來. #$str是WebPL.txt被當stdin讀進來的每一行 直到WebPL.

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者allenlin1122 (光明的路)時間18年前 (2005/11/13 12:05), 編輯資訊
0
0
0
內容預覽:
記得 C 裡面有 sscanf. 不知道 perl 有沒有類似這樣的東西 :). --. 發信站: 批踢踢實業坊(ptt.cc). ◆ From: 140.113.185.186.
首頁
上一頁
1
2
下一頁
尾頁