in reply to Array indices

just a thought: it's not really the index you're interested in. you just want to loop over more than one array in parallel and perl provides no operator for this. other than writing a sub which messes with lots of array and code refs do any of the perl gurus know of some idiom for this? here's the sub i'd use (untested):
sub arrloop { my ($arrays, $code) = @_; # keep calling code until we've been through all of the # arrays. for (my $i = 0; grep { $i <= scalar(@$_) } @$arrays; $i++) { $code->(map { $_->[$i] } @$array); } }
which i could use like this:
arrloop [\@first, \@middle, \@last], sub { my ($first, $middle, $last) = @_; print "Hello $first $middle $last\n"; }
this is just as contrived an examples as Limbic~Region's example, but my question is about iterating over arrays, not proper choice of data structures. if i'm not mistaken perl6's for will solve this.

Edit: s/PRE/CODE/ tags. larsen