Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^7: Passing a value to Mojo::Template template

by davido (Cardinal)
on Apr 15, 2021 at 15:33 UTC ( [id://11131335]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Passing a value to Mojo::Template template
in thread Passing a value to Mojo::Template template

I think this is an example of how creating a hash and obtaining a reference to it is just as easy as creating a reference to an anonymous hash, but the first example has a bug ({...} should be (...)).

This:

my %hash = { key1 => q{123}, key2 => q{456}, }; my $h_ref1 = \%hash;

...should be:

my %hash = ( key1 => q{123}, key2 => q{456}, ); my $h_ref1 = \%hash;

Dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2026-01-20 03:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (124 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.