Raku Books / Perl 6 at a Glance / Perl 6 Essentials
Hello, World!
The Perl 6 compiler can either read a programme from a file or from
the content of the -e command line switch. The simplest
“Hello, World!” programme looks like this:
say "Hello, Perl 6!";Save it in a file and run:
$ perl6 hello.pl
Hello, Perl 6!Alternatively, you may use the -e option:
$ perl6 -e'say "Hello, Perl 6!"'
Hello, Perl 6!Course navigation
← Perl 6 Essentials | Variables →