Perl 6 screencast - part 2 - arrays

This article is about Perl 6. If you are looking for solution regarding the current production version of Perl 5, please check out the Perl tutorial.


Direct link to the Perl 6 arrays screencast

See more Perl 6 entries.

Perl 6 Code examples


  use v6;
  my @names = "Foo", "Bar", "Moo";
  say @names[];
  say "Hello {@names} how are you?";
  say "Hello { join('; ', @names) } how are you?";


  use v6;
  my @names = ;
  say "Hello {@names} how are you?";
  for @names -> $n {
    say $n;
  }


In the comments, please wrap your code snippets within <pre> </pre> tags and use spaces for indentation.
blog comments powered by Disqus
Online courses:


Would you like to get
updated when I publish
the next article?

Follow me:

Google Plus Twitter RSS feed