http://qs1969.pair.com?node_id=730727


in reply to How to convert <,&,>,",' into XML &lt;,&amp;,&gt;,&quot ..

Take a look onto XML::Entities.
Upd: Ignore this, it makes opposite thing as pointed by ikegami