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;
  }

Published on 2010-07-21 by Gabor Szabo

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


Google Plus Twitter RSS feed