Feral_Shade has asked for the wisdom of the Perl Monks concerning the following question:
I am using the HTML::Template->param() function to fill out some online forms that I have, and I have the following problem:
you have to assign the values like this:
and I need to be able to use a variable in place of the hash key. Something like the followingparam(varname => "value");
$template = HTML::Template->new(filename => "file.tmpl"); $varname = "var1"; $template->param($varname => "value");
I know that the above code is invalid.... Is there some way to do this? Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Variable Hash assignments
by jonnyfolk (Vicar) on Apr 20, 2003 at 20:33 UTC | |
|
Re: Variable Hash assignments
by benn (Vicar) on Apr 20, 2003 at 20:14 UTC | |
| |
|
Re: Variable Hash assignments
by benn (Vicar) on Apr 20, 2003 at 20:40 UTC | |
by Feral_Shade (Novice) on Apr 20, 2003 at 20:44 UTC |