hi,

# controller
my @arr = qw/foo bar/;
$self->stash(arr => \@arr);

# template
%= $arr->[0];    # foo

​

On Mon, May 1, 2017 at 6:03 PM, <[email protected]> wrote:

> Hi,
>
> I need to pass an array to my template and I dont know how to do it.
>
> Can please someone help me ?
>
> Thanks   :)
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mojolicious" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/mojolicious.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to