pairwise from List::MoreUtils requires that both arrays have the same length, you can get the same behaviour easily without using any extra module at all:
my @combined = map {"$a1[$_]:$a2[$_]"} ($#a1 < $#a2 ? (0..$#a2) : (0.. +$#a1));
This version can be easily fixed to treat arrays of different length:
my @combined = map {($a1[$_]//"").":".($a2[$_]//"")} ($#a1 < $#a2 ? (0 +..$#a2) : (0..$#a1));
citromatik
In reply to Re^2: iterating 2 arrays in parallel
by citromatik
in thread iterating 2 arrays in parallel
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |