in reply to importing HTML code into perl

I have been heavily using HTML::Template lately for this purpose. It allows you to leave the HTML exactly as is, as filename.html but with an optional added ability to place dynamic HTML-like tags that are replaced with data from your application.

If You are using this for CGI - the use is obvious, but I have also been using it as a static HTML file generator for dynamic content quite nicely.

Check the terrific POD web reference at perldoc.com, http://www.perldoc.com/perl5.6.1/lib/HTML/Template.html for examples and documentation.

I have recently even found that the DBI does infact work with the Template module seemlesly and easily - if you need to hook it to a database: I have many examples now of simple, to advanced useage.