my @array = qw{zero one two}; for my $i (0..$#array){ print qq{$i\t$array[$i]\n}; }