[問題] perl直譯問題

看板Perl作者 (含仔)時間14年前 (2011/06/24 13:10), 編輯推噓0(005)
留言5則, 2人參與, 最新討論串1/3 (看更多)
聽人說perl跟python是直譯式語言 在linux command mode輸入python Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 就會進入python直譯模式 想請問perl的直譯模式要怎麼打開? 直接打perl就會進入一片空白 這時後似乎不管打什麼都沒有反應 (是不是還要加入什麼指令?) 難道都要像這樣輸入 perl -e 'print "Hello, world\n" 才能夠直譯嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.179.2

06/24 13:35, , 1F
perl正常是要走compile phase的
06/24 13:35, 1F

06/24 13:36, , 2F
你可能要用debug mode:
06/24 13:36, 2F

06/24 13:37, , 3F
perl -de '' #解它空白的code debug, code結束後會給你一個
06/24 13:37, 3F

06/24 13:37, , 4F
interactive session
06/24 13:37, 4F

06/24 16:51, , 5F
恩恩 謝謝樓上 我試試看
06/24 16:51, 5F
文章代碼(AID): #1E11mgyE (Perl)
文章代碼(AID): #1E11mgyE (Perl)