in reply to Join 2 arrays horizontally

When dealing with parallel arrays, you will need to iterate over the indexes of one of the arrays rather than iterating over the array itself.

for my $i (0..$#array1) { say "$array2[$i] $array1[$i]"; }

Replies are listed 'Best First'.
Re^2: Join 2 arrays horizontally
by perl_5eeker (Novice) on Mar 04, 2019 at 00:12 UTC
    Thanks for your response, I have it working now.