I'd like to convert the following p5 code to p6:
my @z = (
[ 'a1', 'a2' ],
[ 'b1', 'b2', 'b3' ]
);
for my $r (@z) { print "@$r\n" }
I thought this might do the trick [1]:
my @z = (
[ 'a1', 'a2' ],
[ 'b1', 'b2', 'b3' ]
);
for @z -> $r { say $r }
However, the p5 version prints:
a1 a2
b1 b2 b3
while the pugs p6 version prints:
a1
a2
b1
b2
b3
Is this a Pugs bug? If not, can anyone suggest a legitimate p6 version?
/-\
[1] Suggested by stvn at http://www.perlmonks.org/?node_id=445339
Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com
Thread Next