看板 Perl 關於我們 聯絡資訊
為什麼我照著課本上在命令列打上 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)
audreytang:perl -E "say 'andy'" # say 是新的關鍵字,要用 -E 04/20 21:06
abliou:推推推 原來是這樣用!!! 04/20 23:49