# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #57960] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57960 >
r30258: $ ./perl6 -e '.say for [1,2,3]' # as expected 1 2 3 $ ./perl6 -e 'for [1,2,3] { .say }' # shouldn't that be the same? 1 2 3 $ ./perl6 -e 'for [1,2,3] -> $a { say $a }' # or this? 1 2 3 $ ./perl6 -e 'for [1,2,3].list { .say }' # how do I make it... 1 2 3 $ ./perl6 -e 'for @([1,2,3]) { .say }' # ...loop over the elements? 1 2 3 $ ./perl6 -e 'for [1,2,3].clone { .say }' # aha! um... 1 2 3 All in all, it's difficult to actually loop on the contents of an array at present. The semantics are not very consistent. I'm hoping this is a bug.