diff options
author | B. Watson <yalhcru@gmail.com> | 2015-10-12 16:30:01 -0400 |
---|---|---|
committer | B. Watson <yalhcru@gmail.com> | 2015-10-12 16:30:01 -0400 |
commit | 440229f91b4eee243b7de550fa70e8a3b3f64600 (patch) | |
tree | cbf49bf79735775daf338b3df61cb955b2f84957 /bkt | |
parent | fd56ad21347e2f4b69644e6e18ef48f775ce3c4a (diff) | |
download | misc-scripts-440229f91b4eee243b7de550fa70e8a3b3f64600.tar.gz |
locale/binary issues
Diffstat (limited to 'bkt')
-rwxr-xr-x | bkt | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -1,10 +1,9 @@ #!/usr/bin/perl use warnings; -no warnings 'surrogate'; ## doesn't work use strict; -use open ":locale"; +use open ":locale", ":std"; use Getopt::Std; # this makes getopts exit after --help: @@ -33,11 +32,10 @@ bar 2 40.0% baz 1 20.0% foo 2 40.0% -The name 'bkt' comes from the concept of collecting like items in buckets -(this is basically how a hashtable works). The original plan was to name -this script 'bucketize', but who wants to type all that? Also, purely -to support lazy typists, $SELF implements subsets of the functionality -of cut(1) and sort(1). +The name 'bkt' comes from the concept of collecting like items in +buckets. The original plan was to name this script 'bucketize', but +who wants to type all that? Also, purely to support lazy typists, $SELF +implements subsets of the functionality of cut(1) and sort(1). General options: --help @@ -254,7 +252,7 @@ for(@ARGV) { }; } - binmode $fh, ":bytes" if $opt{B}; + binmode $fh, ":raw:bytes" if $opt{B}; $readfiles++; while(<$fh>) { |