in reply to Re: convert rows to columns
in thread convert rows to columns

I saw that, to. Also, you can't push to a sigle element of an array that I'm aware of. You have to push to an array. So the line push $arr[$cnt], $xox[$i]."".$xox[1+$i] I believe won't work. You need something like push @arr, $xox[$i]."".$xox[1+$i].

ack Albuquerque, NM

Replies are listed 'Best First'.
Re^3: convert rows to columns
by choroba (Cardinal) on Nov 27, 2012 at 10:31 UTC
    In recent Perl (since 5.14), you can push to an array reference. It is not autovivified, though; therefore,
    perl -e '$x[0] = []; push $x[0], 1'
    works, but
    perl -e 'push $x[0], 1'
    does not.
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ