in reply to nested for loop with assumed scalars
You must name the loop variable for at least one of the loops.
for my $i ( 1 .. $#array1 ) { for my $j ( 1 .. $#array1 ) { print "$i $j\n"; } } [download]
Makeshifts last the longest.