It is not enough just to say use utf8;. Your source file must actually be in utf-8 rather than some other encoding. When I download your sample and try to run it, I get the same compile errors you do. But when I edit it with vim and issue the vim :set fileencoding? command, it says fileencoding=latin1. When I :set fileencoding=utf-8 and save the file, the compile errors go away.
As kcott pointed out, you will also need to correct your use IO ... to get the output you want.
In reply to Re: Why does Perl choke on my UTF8 identifier?
by Anonymous Monk
in thread Why does Perl choke on my UTF8 identifier?
by Intrepid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |