You could use the
HTML::FromText module which should do basic HTML formatting for you, and if you're using a webserver to deliver the webpages make sure you use the
CGI module for at least the basics such as header information. If we had further information about the format of the data you're printing out there's potentially many more modules that could be used to emulate the formatting faithfully.
Update: there's also the HTML::TextToHTML module which looks to have a bunch of handy features.
HTH
_________
broquaint