use strict; use warnings; use utf8; use Encode; my $utf8 = Encode::decode('utf-8', shift); $utf8 =~ tr![]€!<>E! print $utf8;