Unless I missed something, our post doesn't imply that that form Must* be programmatically gnerated. You could simply serve up the HTML via a template like so:
use Template;
use CGI qw/:standard -debug/;
# Present form for data entry
my $template = Template->new();
my $vars = ""; # no vars in this template
print header;
$template->process("my-Template-filename.tmpl", $vars)
|| &error( "Template process failed: ",
$template->error() );
# my predefined error function
Processing the form when submited is covered by the post by saintbrie.
-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday