in reply to Remembering values from an HTML form

If you have a pre-generated form that you read from disk and want to make it "sticky", you should look at using HTML::FillInForm. Simple use would be:

my $q = CGI->new; my $fif = HTML::FillInForm->new; my $output = $fif->fill(file => 'htmlfile.html', fobject => $q); print $output;
Note that this code will fill the form with ALL the parameters passed from $q, but you can change and delete the parameters as needed prior to calling fill so that you can remove bad input.

A second option or for use in addition would be to use a templating system such as HTML::Template or Template Toolkit.

Hope this helps.
Sean