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

Re: Mojo Template, passing dynamic index to array.

by LanX (Saint)
on Jul 13, 2021 at 19:16 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-03-28 21:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found