You need to use utf8; to tell perl that the euro symbol in your script is utf8 (not bytes).
(modified to read bytes from command line, else decode fails)
use strict; use warnings; use utf8; use Encode; my $utf8 = Encode::decode('utf-8', shift); $utf8 =~ tr![]€!<>E! print $utf8;
Good Day,
Dean
In reply to Re: tr/// latin1 on utf8 string
by duelafn
in thread tr/// latin1 on utf8 string
by Marcello
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |