Can you tell me why this example below does not work in perl v5.28?
It is from book http://modernperlbooks.com/books/modern_perl_2016/03-perl-language.html#VW5pY29kZWFuZFN0cmluZ3M by chromatic.use utf8; sub £_to_¥ { ... } my $yen = £_to_¥('1000£');
This is my tiny script and its output with diagnostics.
Output:#!/usr/bin/perl use strict; use warnings; use diagnostics; use utf8; use feature qw/say/; binmode STDOUT, ":utf8"; my $€ = 1; say '------------------------';
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.
In reply to Currency symbols in variable names by pme
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |