in reply to iterating 2 arrays in parallel
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]]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: iterating 2 arrays in parallel
by shmem (Chancellor) on Apr 15, 2009 at 14:50 UTC | |
by JavaFan (Canon) on Apr 19, 2009 at 19:10 UTC |