Maybe this will do what you want:
http://www.template-toolkit.org/docs/plain/Manual/Directives.html#Loop_Processing
[% users = {
tom => 'Thomas',
dick => 'Richard',
larry => 'Lawrence',
}
%] [% FOREACH u IN users %]
* [% u.key %] : [% u.value %]
[% END %]-- Josh
Bart Simpson wrote:
Can you assign to a list in a template? I tried everyway i can imagine. I want to get the key and value from the each function.
I tried :
[k v ] = hashref.each; (k v) = hashref.each; (k , v)= hashref.each; k, v = hashref.each;
thanks
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
_______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates
_______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates
