use HTML::Entities qw/decode_entities/; my $ok=decode_entities($orig);