Merge branch 'master' of /home/hjp/git/simple
This commit is contained in:
commit
f84e48fd1b
|
@ -3,6 +3,6 @@ use warnings;
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
print "\$(BINDIR)/%: %\n";
|
print "\$(BINDIR)/%: %\n";
|
||||||
print "\tcp \$^ \$@\n";
|
print "\tinstall -m 755 \$^ \$@\n";
|
||||||
print "\$(MAN1DIR)/%: %\n";
|
print "\$(MAN1DIR)/%: %\n";
|
||||||
print "\tcp \$^ \$@\n";
|
print "\tinstall -m 644 \$^ \$@\n";
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
use warnings;
|
use warnings;
|
||||||
use strict;
|
use strict;
|
||||||
use Getopt::Long;
|
|
||||||
use Pod::Usage;
|
|
||||||
use autodie;
|
use autodie;
|
||||||
|
|
||||||
my $encoding;
|
use Getopt::Long;
|
||||||
|
use I18N::Langinfo qw(langinfo CODESET);
|
||||||
|
use Pod::Usage;
|
||||||
|
|
||||||
|
my $encoding = langinfo(CODESET);
|
||||||
|
|
||||||
GetOptions('encoding=s', \$encoding) or pod2usage();
|
GetOptions('encoding=s', \$encoding) or pod2usage();
|
||||||
|
|
||||||
|
@ -22,7 +24,7 @@ $total += $_ for values %hist;
|
||||||
binmode STDOUT, ":encoding(UTF-8)";
|
binmode STDOUT, ":encoding(UTF-8)";
|
||||||
for (sort keys %hist) {
|
for (sort keys %hist) {
|
||||||
my $cp = ord;
|
my $cp = ord;
|
||||||
printf("%x %d %o %s\t%8d %f\n",
|
printf("%x\t%d\t%o\t%s\t%7d\t%f\n",
|
||||||
$cp, $cp, $cp, /\p{Graph}/ ? $_ : ".", $hist{$_}, $hist{$_} / $total);
|
$cp, $cp, $cp, /\p{Graph}/ ? $_ : ".", $hist{$_}, $hist{$_} / $total);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue