For example, this test code:
#!/usr/bin/perl
use strict;
use warnings;
use HTML::Entities;
print "Content-type: text/html\n\n";
my $str = "Fred's shoe";
_decode_entities($str, { amp => "&", 59 => ";" }, 0);
print "<p>$str\n";
Outputs
<p>Fred's shoe
even though the docs say
_decode_entities( $string, \%entity2char, $expand_prefix )
This will in-place replace HTML entities in $string. The %entity2char hash must be provided. Named entities not found in the %entity2char hash are left alone.
Time flies like an arrow. Fruit flies like a banana.