diff --git a/charhist/charhist.pl b/charhist/charhist.pl index 8460480..0cdcf58 100644 --- a/charhist/charhist.pl +++ b/charhist/charhist.pl @@ -1,11 +1,13 @@ #!/usr/bin/perl use warnings; use strict; -use Getopt::Long; -use Pod::Usage; 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();