You can also combine the prepare/execute/fetchall_arrayref into a single call to selectall_arrayref, if you use the Slice parameter. This is the simplest way to send query results directly into HTML::Template. Take a look at the excellent DBI recipes for more info.my $rows = $sth->fetchall_arrayref({}); $_->{nw} = addComma( $_->{nw} ) for @$rows; $tmpl->param( items => $rows ); ## Suitable for: ## ## <tmpl_loop items> ## <tmpl_var name> ## <tmpl_var nw> ## <tmpl_var number> ## </tmpl_loop items>
blokhead
In reply to Re: Sending hash to HTML::Template
by blokhead
in thread Sending hash to HTML::Template
by Steny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |