in reply to tr/// latin1 on utf8 string

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