for (0..$#array) { print "$i: $array[$i]\n"; }