http://www.perlmonks.org?node_id=11104977

pme has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

Can you tell me why this example below does not work in perl v5.28?

use utf8; sub _to_ { ... } my $yen = _to_('1000');
It is from book http://modernperlbooks.com/books/modern_perl_2016/03-perl-language.html#VW5pY29kZWFuZFN0cmluZ3M by chromatic.

This is my tiny script and its output with diagnostics.

#!/usr/bin/perl use strict; use warnings; use diagnostics; use utf8; use feature qw/say/; binmode STDOUT, ":utf8"; my $ = 1; say '------------------------';
Output:
Unrecognized character \x{20ac}; marked by <-- HERE after my $<-- HERE + near column 5 at ./uni2.pl line 10 (#1) (F) The Perl parser has no idea what to do with the specified char +acter in your Perl script (or eval) near the specified column. Perhaps +you tried to run a compressed script, a binary program, or a director +y as a Perl program. Uncaught exception from user code: Unrecognized character \x{20ac}; marked by <-- HERE after my $<-- +HERE near column 5 at ./uni2.pl line 10.