in reply to multicolumn files
"Not that the arrays has not the same number of columns but have the same number of lines"
While this statement holds true for the number of lines, you can achieve what you want by changing
my @join = (@array1, @array2); print @join;
to
print qq{$array1[$_] $array2[$_]\n} for (0 .. $#array1);
I haven't tested this with your code. I did, however, check the technique on the commandline:
$ perl -Mstrict -Mwarnings -E ' my @a1 = (q{1 2 3}, q{4 5 6}); my @a2 = (q{a b c}, q{d e f}); say qq{$a1[$_] $a2[$_]} for (0 .. $#a1); ' 1 2 3 a b c 4 5 6 d e f
-- Ken
|
|---|