my $mid = int( (@array+1)/2 ); for my $i (0 .. $mid-1) { if ($mid+$i < @array) { print($array[$i], "\t", $array[$mid+$i], "\n"); } else { print($array[$i], "\n"); } }
There's gotta be a module on CPAN that does it better...
In reply to Re: splitting one column into two
by ikegami
in thread splitting one column into two
by lunabelle22a
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |