Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: A key called keys in a hash in Template Toolkit

by mbethke (Hermit)
on Mar 08, 2013 at 16:30 UTC ( [id://1022460]=note: print w/replies, xml ) Need Help??


in reply to A key called keys in a hash in Template Toolkit

TTBOMK you can't, that's the downside of the simplified dot syntax. What you can try however is to iterate the hash without using .keys. Template::Manual::Directives has this example:

[% FOREACH u IN users %] * [% u.key %] : [% u.value %] [% END %]
FOREACH automatically sorts by key if you use the iterator that way.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-06-22 02:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.