Print share

This commit is contained in:
Peter J. Holzer 2018-09-13 19:02:40 +02:00
parent 473a272066
commit e27477085c
1 changed files with 5 additions and 1 deletions

View File

@ -16,10 +16,14 @@ if (@ARGV) {
readfile();
}
my $total = 0;
$total += $_ for values %hist;
binmode STDOUT, ":encoding(UTF-8)";
for (sort keys %hist) {
my $cp = ord;
printf("%x %d %o %s\t%d\n", $cp, $cp, $cp, /\p{Graph}/ ? $_ : ".", $hist{$_});
printf("%x %d %o %s\t%8d %f\n",
$cp, $cp, $cp, /\p{Graph}/ ? $_ : ".", $hist{$_}, $hist{$_} / $total);
}
sub readfile {