in reply to Re^3: Use of HTML::Template
in thread Use of HTML::Template

Thanks again.

So if I want to use that for merging all the variables of a page, could I do it like this:
my $template = HTML::Template->new( scalarref => $html_content, %_array_of_fields ); );

Where
%_array_of_fields = ( 'option' => "$option", 'option2' => "$option2", 'option3' => "$someOtherOptionVariable", );
would that work?

Thank you

Replies are listed 'Best First'.
Re^5: Use of HTML::Template
by GrandFather (Saint) on Feb 08, 2009 at 09:35 UTC

    Unfortunately no. According to my reading of the documentation you must use param () to set parameters:

    my $template = HTML::Template->new( scalarref => $html_content); $template->param (%_array_of_fields);

    Perl's payment curve coincides with its learning curve.