Home » Posts tagged "Perl 6"

My first Perl 6 code

Rakudo Star, a useful, usable, “early adopter” distribution of Perl 6, was released today. And later this evening a MSI installer for Windows was released.

I immediately installed it on my laptop after I had fetched the installer and started up Rakudo REPL, an interactive Perl 6 shell. After a quick peek in the Using Perl 6 PDF I tried the following code.

  1. > say "test";
  2. test
  3. > my $line = ‘la di da’;
  4. la di da
  5. > $line.split(‘ ‘);
  6. la di da
  7. > $line.split(‘ ‘).join(‘+’);
  8. la+di+da
  9.  

I know it’s a completely useless example but it’s cool how it just worked on my first try. Think I’ll experiment some more with Rakudo this weekend.