in reply to have cgi send data back to form on error

What you need is some sort of routine that loads your form page, looks for field data insertion points, and adds the data. For instance, instead of:
<input type="text" name="Email" size="20">
you might have:
<input type="text" name="Email" size="20" value="Email">
And then a routine might load the page into a variable and perform the following replace (untested, but should theoretically work):
$text =~ s/value="(.*?)"/'value="'.$query->param($1).'"'/eg;
This will of course not work for textareas, selects, etc., but a slightly more advanced templating system will be able to manage those as well.