One information which I forgot to add is that @{[...]} is a construct to tunnel Perl code into string interpolation.
This is handy if you don't have a template engine.
For instance
my $tmpl = << "__HTML__"; ... some HTML ... <h1>@{[ text ( en => "title", de => "Titel", ) ]}</h1> ... more HTML ... __HTML__
is code I actively use in a CGI where the sub text() decides which language to insert.
The code is executed in list context, that's why %hash get expanded to a list.
HTH!
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery
In reply to Re: Print the contents of a hash without looping. (template)
by LanX
in thread Print the contents of a hash without looping.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |