This prints:my @data = map {chomp; [split /:/]} <DATA>; my $width = length $data[0][0]; # Assume they're all the same length +. my $Width = @{$data[0]}; my $divider = "-" x (($width + 1) * $Width); my $topline = $divider x 2; chop $topline; say $topline; foreach my $line (@data) { print "$_|" for @$line; say "\n$divider"; } __DATA__ A:B C:D
------- A|B| ---- C|D| ----
In reply to Re: tabular format of data
by JavaFan
in thread tabular format of data
by deepak_4682us
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |