Re: [問題] 剛接觸perl的極新手問題

看板Perl作者 (ing)時間18年前 (2006/12/08 17:14), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《NEIVES ( )》之銘言: : 我作業系統是用windows XP (SP2) : 有安裝ActivePerl (ActivePerl-5.8.8.819-MSWin32-x86-267479.msi) : 然後使用Crimson Editor來編寫Perl : (裡面的user tool裡的Command欄位中有填入 c:\perl\bin\perl.exe) : 不過在執行最簡單的 "hello world" 時卻執行不出來... orz : 以下是程式碼 (Crimson Editor就有的範例) : #!/usr/bin/perl -w : # basic template file for perl : use strict; : print "hello world\n"; : 以下為Crimson Editor最底下顯示的結果 : ---------- Capture Output ---------- : > "C:\Perl\bin\perl.exe" hello world program.pl 很詭異 為什麼你的shell會吃到這樣的字串 正常執行應該是 C:\Perl\bin\perl.exe program.pl 不知道為什麼 可能是因為你editor設定的關係 送出的 command 變成 "C:\Perl\bin\perl.exe" hello world program.pl perl 把 hello 當成 你要執行的檔案名吃進去 然後告訴你找不到這個檔案 所以問題或許在你editor的設定上? : Can't open perl script "hello": No such file or directory : > Terminated with exit code 2. : 請問"No such file or directory"是代表我沒有設定好Perl嗎? : 還是其他什麼問題呢?? : 希望板上的高手能教我該怎麼做才能讓Perl正確的執行.. QQ -- 隨著歲月流過 曾經的年少輕狂 不 ┌┐ 那些瘋狂的不拘的奔放的 刻在一張張相片上 也刻在心中 無意中提起 也只勾起嘴角的微笑 └┘ 是啊 你不是從前的你 我也不是從前的我了 ┘ 我們被外在的環境改變 重塑 被壓進這個世 ┌┐ └ 但當凝望你的雙眸┐ 最令我感動的 ┐ └ ξ amiangel └ 是你眼神深處 我們曾有過的真摯情感 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 163.22.18.90

12/09 00:15, , 1F
"C:\Perl\bin\perl.exe" "hello world program.pl"
12/09 00:15, 1F
文章代碼(AID): #15UIpZO2 (Perl)
討論串 (同標題文章)
文章代碼(AID): #15UIpZO2 (Perl)