Another candidate for "obfuscated questions".
Look into
Text::Template, which does the sort of thing
you are talking about.
CGI.pm takes input from the
browser, not an HTML file. The
Text::Template can, of
course, take variables from
CGI.pm where required.