What to do if the arrays are not of equal length is left as an exercise to the reader.my @combinearray; for (my $i = 0; $i < @array1; $i++) { $combinearray[$i] = [$array1[$i], $array2[$i]]; }
In reply to Re: iterating 2 arrays in parallel
by JavaFan
in thread iterating 2 arrays in parallel
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |