my @combinearray; for (my $i = 0; $i < @array1; $i++) { $combinearray[$i] = [$array1[$i], $array2[$i]]; }