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