aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2015-10-12 16:30:01 -0400
committerB. Watson <yalhcru@gmail.com>2015-10-12 16:30:01 -0400
commit440229f91b4eee243b7de550fa70e8a3b3f64600 (patch)
treecbf49bf79735775daf338b3df61cb955b2f84957
parentfd56ad21347e2f4b69644e6e18ef48f775ce3c4a (diff)
downloadmisc-scripts-440229f91b4eee243b7de550fa70e8a3b3f64600.tar.gz
locale/binary issues
-rwxr-xr-xbkt14
1 files changed, 6 insertions, 8 deletions
diff --git a/bkt b/bkt
index 0d67366..4dda169 100755
--- a/bkt
+++ b/bkt
@@ -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>) {