Timothy (>): >>> my $r = <1 2 3>; for $r -> $t { say $t }; >> >> Which revision of Rakudo are you running? In my r32239, it outputs "1 >> 2 3" on the same line (i.e. it doesn't iterate over each element). > > Oops. My bad. Try either of the following with parrot 0.8.0. > > perl6 -e 'my $r = <1 2 3>; for $r.values() -> $t { say $t };' > > perl6 -e 'my @r = <1 2 3>; for @r -> $t { say $t };'
Thank you. Yes, the first one is the one I've understood to be the correct way to loop over an array stored in a scalar variable. The fact that this, IIUC, worked in 0.8.0 but doesn't any more in r32239, is a bit concerning. I would think that there would be regression tests against that, but maybe there aren't. I'll have a look at the test suite, and report my findings. // Carl