in reply to iterating 2 arrays in parallel

There are many ways. One of them:
my @combinearray; for (my $i = 0; $i < @array1; $i++) { $combinearray[$i] = [$array1[$i], $array2[$i]]; }
What to do if the arrays are not of equal length is left as an exercise to the reader.

Replies are listed 'Best First'.
Re^2: iterating 2 arrays in parallel
by shmem (Chancellor) on Apr 15, 2009 at 14:50 UTC
      Ah, the "There's only one (proper) way to do it" attitude.

      Sorry, but you can find Python around the next corner.