Venkataramana Mokkapati wrote:
>How do I iterate through an ArrayRef?
>
>$template->param(Info => [11,22,33]);
>
>Looks like, HTML::Template ALWAYS needs HashRef to iterate.
>Is my understanding correct?Get more from the Web. FREE MSN Explorer download :
>http://explorer.msn.com
>
Yes you are correct.
You need to do $template->param(InfoLoop => [{Info => 11}, {Info => 22},
{Info => 33}]);
This way you get a loop named InfoLoop and in this loop you have the
vars named Info;
<TMPL_LOOP INFOLOOP>
<TMPL_VAR INFO>
</TMPL_LOOP>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]