http://qs321.pair.com?node_id=25903

Q&A > CGI programming > What is the best tool to embed perl in HTML? - Answer contributed by gregorovius

I recommend HTML::Embperl. It allows code to be edited on your favorite HTML editor (e.g. Dreamweaver) at the rendered HTML level, so you have all page design and code visible at the same time (though this could be a drawback, since too much code may clutter your page as seen on your editor, but you can always create Embperl subroutines).

Another plus is that it readily integrates with DBIx::Recordset, which is a powerful layer atop DBI which simplifies access to SQL databases by, for example, tying tables to hashes. I would say that DBIx::Recordset is generally more portable than DBI and very valuable in itself.

Some other features of Embperl that I haven't seen elsewhere (my other platform has been MS/IIS/ASP/PerlScript) are:

* Automagically generated HTML tables via the $row and $col variables.
* Automatic filling of HTML forms through the %fdata hash.
* Persistant per-user data through the %udat hash (by way of Apache::Session and an SQL database).
* Persistant per-page data through the %mdat hash.
* Readily available help from it's mailing list and constant maintenance and improvements to the code by its author. <href="http://perl.apache.org/embperl">HTML::Embperl</href>