use utf8; sub £_to_¥ { ... } my $yen = £_to_¥('1000£'); #### #!/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 character in your Perl script (or eval) near the specified column. Perhaps you tried to run a compressed script, a binary program, or a directory 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.