Anonymous user
Align columns: Difference between revisions
m
→{{header|Perl}}
Line 1,074:
sub columns {
my @lines = map {[split /\$/]
local $_ = shift;
for my $col (0 .. max map {$#$_
my $max = max my @widths = map {length $lines[$_][$col]
for my $row (0 .. $#lines) {
my $pad = ($max - $widths[$row]) / 2;
|