Perl 6 Perl 6 today #47

Basic I/O

Standard filehandles are available as $*IN, $*OUT, and $*ERR

Filehandle methods work on them also:

print "Your name is: ";
my $name = $*IN.get;
say "Hello, $name!";

Built-in prompt and slurp functions:

my $name = prompt("Your name is: ");

my $content = slurp("data.txt");
Copyright © 2009
http://www.pmichaud.com/2009/pres/