in reply to HTML embedded in perl

Consider using templates, that way the HTML can reside in a separate file and can be tweaked without changing the Perl code. A few template systems that come to mind are HTML::Template and Text::Template, but there are many more on CPAN.

Hope this helps, -gjb-