[Perl6] Pugs, Hello World

嗯,讓我們開始迎接 Perl6 的來臨,首先來寫個 Hello World 吧,這是我的第一隻 Pugs 程式:

#!perl6
use v6;
print “Hello World!n”;

除了前兩行之外,看不出來有什麼不一樣對吧?
再來一個修改版 :p

#!perl6
use v6;
say “Hello World!”;
“Hello World!”.say;

有趣吧!
目前 pugs 是以 haskell 為基礎,有興趣的人可以試著玩看看哦。

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • funp
  • Haohao
  • Hemidemi
  • Live
  • MisterWong
  • TwitThis
  • udn
 

Leave a reply

Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Taiwan
Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Taiwan