use HTML::Entities qw(decode_entities); my $decoded_mail = decode_entities($encoded_mail);