Guy (>), Carl (>>), Moritz (>>>): >> > for @($ar) { ... } >> >> This would arguably be the nicest variant.
Well, actually, by "this" I meant all three variants that Moritz suggested. :) >> > for @$ar { ... } >> > or even >> > for @ $ar { ... } >> > or >> > for @($ar) { ... } Guy (>): > for ( @$ar ) { ... } > > ? That's Moritz' first suggestion, but with a pair of unnecessary parentheses thrown in. :) Larry (>), Carl (>>): >: All I know is that `for $ar.elems { ... }` used to work for this case. >: It doesn't seem to work anymore. >: >: Time to file a ticket, methinks. > >Er, .elems is always supposed to return a number. Maybe you want >.values there instead, though that doesn't work either. :) Yes, .values. Sorry about the confusion. (With all the shortcomings of the name "length", it doesn't invite confusion about whether a number or a list of things is returned, as "elems" and "values" might. That said, I've only used either method a handful times, so maybe it's just a question of language acquisition.) // Carl