Hi,

I'm looping through an array of hashes with "foreach" and have problems using "loop.last":

<p>
<% foreach record in record_list %>
<% record_lastname>, <% record.firstname %><% if not loop.last%>; <% end %>
<% end %>:
</p>

However, the Template module throws an error:
file error - parse error - pub_author.tmpl line 3: unexpected token (LAST) [% if not loop.last %].

The same error is thrown by "unless loop.last".

Can someone please explain this to me?

Thank you, and best regards,

Birgit Kellner


_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to