I'm getting this error:
My .tmpl contains:HTML::Template->output() : fatal error in loop output : HTML::Template +::param() : attempt to set parameter 'department' with an array ref - parameter +is not a T MPL_LOOP! at C:/xampp/perl/site/lib/HTML/Template.pm line 3068 at file.pl line 18
and again my perl is:<font size="4">Department: </font> <ul><li><select name="dept"> <TMPL_LOOP DEPT> <option value="<TMPL_VAR DEPARTMENT>"><TMPL_VAR DEPARTMENT></optio +n> </TMPL_LOOP> </select></li> </ul>
Aren't you supposed to set the name of <TMPL_LOOP> to an array?my @department = @{ $xml->{position}->{departments} }; $template->param(DEPT => \@department); print $template->output();
In reply to Re^4: Problems getting info from .xml to display with HTML::Template
by Anonymous Monk
in thread Problems getting info from .xml to display with HTML::Template
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |