7 td-pivot - Switch columns for rows in tabular data
15 Must read and buffer the whole STDIN before output any data,
16 so inpractical on large data.
20 no if ($] >= 5.018), 'warnings' => 'experimental::smartmatch';
21 do '/usr/lib/tool/perl5/tabdata/common.pl' or die "$@";
29 my @row = read_record
(\
*STDIN
);
31 my $cols = scalar @row - 1;
32 $max_col = $cols if $cols > $max_col;
36 for my $cnum (0..$max_col)
38 print join $FS, map {$_->[$cnum]} @data;