Just for the sake of completeness: you could also have used the commandline switch -C. In your case, to set the UTF-8-ness of the filehandles STDIN and STDOUT:
#!/usr/bin/perl -CIO use utf8; # the script's encoding, i.e. literal strings, regexes # ...
(or, instead of -CIO, you could have written -C3, if you like it shorter...) See perlrun for the details.
In reply to Re^3: I/O encoding question
by almut
in thread I/O encoding question
by akho
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |