I'll outline what I'm attemping to do just in case I'm misguided. This is a web application using CGI.pm and HTML::Template
In a module I create a hash
our %cgi_vars = $q->Vars; ## Collects all my form data
Within a .cgi script, I update values in the %cgi_vars hash and now want to transfer the new values into my .tmpl using associate. In order to do this, I (think) I need to put the values back into the $q->param() object.
foreach (keys %cgi_vars) { $q->param($_ => $cgi_vars{$_}); }
This all seems to work until the value of $cgi_vars($_) = "". In that case the value remained unchanged, so I did some testing with just 1 element...
## This worked if ($cgi_vars{fname}) { $q->param('fname' => $cgi_vars{fname}); } else { $q->param('fname' => ""); } ## But this did not $q->param('fname' => $cgi_vars{fname});
Could someone explain where I'm going astray? Or maybe there's a better way to deal with this
In reply to Using associate with HTML::Template by nedals
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |