Илья wrote:
> Hi there,
> question about arrays and array refs in Rakudo today.
>
> I have array ref
> my $ar = [1,2,3];
> how can I go over it?
Currently I think you can't, because the array contextualizer isn't
implemented yet. I think it should be
for @$ar { ... }
or even
for @ $ar { ... }
or
for @($ar) { ... }
Last time I tried, there as a workaround with binding to a temporary array:
my @a := $ar;
for @a { ... }
but it's not pretty, and I haven't tested it yet.
Cheers,
Moritz
--
Moritz Lenz
http://perlgeek.de/ | http://perl-6.de/ | http://sudokugarden.de/