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__ <b>This is some HTML</b> [download]