>>>>> "Birgit" == Birgit Kellner <[EMAIL PROTECTED]> writes:
Birgit> Hi, Birgit> I'm looping through an array of hashes with "foreach" and have problems using Birgit> "loop.last": Birgit> <p> Birgit> <% foreach record in record_list %> Birgit> <% record_lastname>, <% record.firstname %><% if not loop.last%>; <% end %> Birgit> <% end %>: Birgit> </p> Birgit> However, the Template module throws an error: Birgit> file error - parse error - pub_author.tmpl line 3: unexpected token (LAST) [% Birgit> if not loop.last %]. Birgit> The same error is thrown by "unless loop.last". Birgit> Can someone please explain this to me? Unless you've done something other than just change your delimiters away from [% %] to <% %>, the keywords are also (mostly) case-sensitive. So you want things like: <% FOREACH record IN record_list %> etc. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[email protected]> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! _______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates
