in reply to HTML Formatting of perl code

You could simply use something like HTML::Template to populate a template file with the values you have.

Martin