πŸ“˜ Hello, World! in Perl 6

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!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s