use utf8; # to state that the script itself is in utf8 binmode STDIN, ":encoding(utf8)"; binmode STDOUT, ":encoding(utf8)"; use as_utf8; # which is the hack posted at http://www.perlmonks.org/?node_id=651574