Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Mojo Template, passing dynamic index to array.

by LanX (Sage)
on Jul 13, 2021 at 19:16 UTC ( #11134973=note: print w/replies, xml ) Need Help??


in reply to Mojo Template, passing dynamic index to array.

According to Mojo::Template please try
<p> Location: </br> <%= $local->{place}[ $number ]{street} %> </p>

> The code works if its like this: <% $local->{ place }[ 0 ]{ street } %>

Unlikely, the = is missing in <%= to insert the value

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11134973]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2021-09-27 14:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?