"Carl Mäsak" schreef: > Ruud: >> Carl: >>> But maybe a variable that implicitly carries along the loop index >>> would be even snazzier? >>> >>> for @array -> $val { >>> say "$.\t$val"; >>> } >> >> Or give the block a name (label), and have an index (or several >> indexes, like some that are reset by redo an some that are not) >> available, attached to that name. > > That sounds like an interesting idea. Do you have a short snippet to > hint of what that would look like?
Maybe something like: for @array -> $val { say for.ix, "\t$val"; } for @array -> $val NAME1: { say NAME1.ix, "\t$val"; } -- Affijn, Ruud "Gewoon is een tijger."