in reply to A Perl/CGI alternative to PHP's htmlentities()?
As I interpret the php docs, it looks like a function in the HTML::Entities library,
encode_entities( $string_to_encode, $unsafe_chars ), does just about the same thing as the php "htmlentities" function (note: I don't "know" php).
In Section
Seekers of Perl Wisdom