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