To simply print just:my @num = qw (1 2 3 4 5); my @alp = qw (A B C D E); # these two arrays always come in same size foreach my $num (@num){ foreach my $alp(@alp){ print "$num-$alp\n"; } }
So I want them to each element from each array printed in concordance respective to their position. If possible I want to keep it as 'foreach' structure, so it allows me to apply it to more complex array structure (array of array).1-A 2-B 3-C 4-D 5-E
In reply to Concordance Printing of Two Arrays by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |