http://qs321.pair.com?node_id=848781

punch_card_don has asked for the wisdom of the Perl Monks concerning the following question:

Mercantile Monks,

Could someone please give me a clue on using the decode_entities() function of the HTML::Entities module?

I just want to decode & to & and &#59; to ;

Based on the documentation's example, I've tried many variations on:

decode_entities($mystring, { amp => "&", 59 => ";" }, 0);
but it keep decoding chacters I don't want decoded, like apostrophes.

Also, the docs show it as having a leading underscore (_decode_entities), but it seems to work without.

Thanks




Time flies like an arrow. Fruit flies like a banana.