in reply to Populating a form with data from a DB

I don't use to generate HTML, but I think you can add -value to your args. Something like this:
sub getInvest { my $investID = shift || return {}; # grab row from database with fethrow_hashref() return \%invest; } sub defaultNewInvest { my $q = shift; my $fillIn = getInvest($q->param('investID')); # ... $q->td( ["Title:", $q->textfield(-name=>"invest_title", -size=>40, +-value=>$fillIn->{'invest_title'} )]) ]); }
Using a templating solution like HTML::Template is a good way to handle this type of thing, because you can usually just pass the hash you get from your database call right into the template's param() method.