On Wed, Aug 16, 2000 at 11:42:20AM -1000, Tim Jenness wrote:
> What about:
> 
>      for (0..$#array) {
>          print $array[$i], " is at index ", $i, "\n";
>      }
> 
> I use that whenever I need to loop over indices of two arrays at once.

And with the proposed zip() you may be able to do something like

  for my($val,$i) (zip(@array,0..$#array)) {
  }

Graham.

Reply via email to