Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
normalize CSV output
  • Loading branch information
coke committed Aug 25, 2013
1 parent 7f0daa3 commit 5c4485f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cull
Expand Up @@ -37,12 +37,13 @@ foreach my $type (sort @types) {
if ($max != 0) {
$per = int( $pass{$type}/$max *100*100)/100;
}
$line .= "; $type ($per%)"
$line .= "; $type ($per%)";
}

say $line;
foreach my $type (sort @types) {
my $impl = shift @{$line{$type}};
my @vals = map { s/^\s+// } @{$line{$type}};
$impl = '"' . $impl . '"';
printf "%-8s,%6s,%6s,%6s,%6s,%6s,%6s\n", $impl, @{$line{$type}};
print join(",", $impl, @{$line{$type}}), "\n";
}

0 comments on commit 5c4485f

Please sign in to comment.