in reply to Why does Perl choke on my UTF8 identifier?
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Why does Perl choke on my UTF8 identifier?
by Intrepid (Curate) on Mar 30, 2021 at 20:20 UTC | |
by bibliophile (Prior) on Mar 31, 2021 at 14:54 UTC |