in reply to Scalar string to web page

HTML::FromText may fill the bill for you.

use warnings; use strict; use HTML::FromText; print text2html ('<b>This is some HTML</b>') . "\n"; __END__ &lt;b&gt;This is some HTML&lt;/b&gt;

Perl is Huffman encoded by design.