Anonymous user
Align columns: Difference between revisions
m
→{{header|Perl}}
Line 1,074:
sub columns {
my @lines = map
my ($pos) = map {/center/ or /right/ * 2} @_;
for my $col (0 .. max map {$#$_} @lines) {
my $max = max my @widths = map {length $lines[$_][$col]} 0 .. $#lines;
for my $row (0 .. $#lines) {
my
splice @cell, $pos, 0, $lines[$row][$col]
}
}
Line 1,096 ⟶ 1,095:
justified,$right$justified,$or$center$justified$within$its$column.
END
</lang>
|