[Catalyst] pass array to template?

Peter Edwards peter at dragonstaff.com
Wed Jun 28 21:48:22 CEST 2006


Hi Sarah

>How can I pass an array to Template Toolkit, then loop through it?

You need to pass a pointer to array otherwise you get the scalar (length) of
the array:
 $c->stash->{numarray} = \@numtextCaps;

Regards, Peter





More information about the Catalyst mailing list