in reply to Perl and HTML

If you enable SSI in Apache (assuming you use Apache) you can include an executable program using include virtual:
<!--#include virtual="/cgi-bin/myscript.cgi" -->

You will have to load mod_include, turn on "Option Includes" in the relevant directory and add/edit in httpd.conf:

AddType text/html .shtml AddOutputFilter INCLUDES .shtml

I think that's about it but see http://httpd.apache.org/docs-2.0/howto/ssi.html for a more complete tutorial.