http://www.perlmonks.org?node_id=985996


in reply to How do I Loop over multiple arrays simultaneously ?

Well, assuming that it's certain that the arrays are all the same length, just translate the statement of the problem into Perl: have an index going the length of one of them, and then use it in all of them:

my @a = qw( a b c ); my @b = qw( A B C ); my @c = qw( 1 2 3 ); for my $i ( 0 .. $#a ) { print $a[$i], $b[$i], $c[$i]; }