Intro
Scalars
Hello WorldThe print() is the same as in Perl 5 but there is a shorter way using say(). That will probably be more common in the future as it also appends a newline at the end of the values it prints. (Actually Perl 5.10 already has this feature) examples/p526/hello_world.p6use v6; # Perl 5: print # Perl 5.10: say # Perl 6: print still works and there is say() # just like in 5.10 adding a newline automatically print "Hello World\n"; say "Hello World"; Copyright 2006, 2007, 2008, 2009, 2010 Gabor Szabo http://szabgab.com/ Index | TOC |
Follow me: