作者jjandy (饅頭)
看板Perl
標題[問題] purl學習手冊第九章最後
時間Mon Apr 11 19:52:40 2011
為什麼我照著課本上在命令列打上
perl -p -i -w -e 'say andy' perl_00.txt
會出現如下error
Can't find string terminator "'" anywhere before EOF at -e line 1.
已確定有perl_00.txt這個檔。
可是確沒有印出"andy\n"
剛才也試了
perl -p -i.bak -w -e "say andy" perl_00.txt
這次雖沒有出現error可是也還是沒有印出"andy\n"
有誰知道為什麼嗎?
我的perl是最新的5.12.3版.
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.144.77
※ 編輯: jjandy 來自: 140.113.144.77 (04/11 20:15)
1F:推 audreytang:perl -E "say 'andy'" # say 是新的關鍵字,要用 -E 04/20 21:06
2F:推 abliou:推推推 原來是這樣用!!! 04/20 23:49