use strict; use warnings; my @data = 1 .. 99; my $cols = 6 ; my $items = $#data + 1; my $rows = int ($items / $cols); $rows += 1 if ($items % $cols); for my $r (1..$rows){ for my $c (1..$cols){ my $i = ($r - 1) + ($c - 1) * $rows; print $data[$i]."\t"; } print "\n"; }
In reply to Re: Even column spreading of data
by Anonymous Monk
in thread Even column spreading of data
by Kage
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |