Try first Perl6 stable release.
This article was written 9 months before official Perl6 release on XMas 2015. It contains instructions about how to build it from sources but you may want to use a tool like rakudobrew to manage Perl6 installations.
I read the announce of Rakudo Star as a
a useful and usable distribution of Perl 6
so let’s try it.
Create a folder for your brand new Perl6.
export PERL6_BASE=$HOME/perl6 mkdir $PERL6_BASE
Do not use any
~ in the
PERL6_BASE value, cause is not expanded by MoarVM Configule.pl script.
You need Perl and few CPAN modules.
Get and build MoarVM
cd /tmp wget http://moarvm.com/releases/MoarVM-2015.03.tar.gz tar xf MoarVM-2015.03.tar.gz cd MoarVM-2015.03 perl Configure.pl --prefix=$HOME/perl6 make install
So far so good, let’s install Rakudo
cd /tmp wget http://rakudo.org/downloads/star/rakudo-star-2015.03.tar.gz tar xf rakudo-star-2015.03.tar.gz cd rakudo-star-2015.03 perl Configure.pl --backend=moar --prefix=$PERL6_BASE --gen-moar make make rakudo-test make install
Ok, let’s say Hello World with Perl6.
Add perl6 to your PATH
Create a file Hello.pl6 containing
say "Hello World"
and run it
Yes I know, it looks like Perl5, but now we can play with Perl6. Happy coding!