die "Arrays of different lengths" unless @array1 == @array2; my @array3 = map { shift ( @array1 ) . pop ( @array2 ) } @array1;