[Zope-dev] Iteration counter

Jon Erickson jon.erickson@neicoltech.org
Tue, 18 Dec 2001 15:11:33 -0600


I need a to create a simple counter variable that will store the number of 
iterations by a <dtml-in> structure.  I have yet to find a way how to do 
this in zope.  Here is an example (in perl) of what I need to do:

@bar = ("sara","jane","kate");

foreach $foo (@bar) {
      print "$foo\n";
      $counter = $counter + 1;
}

I will need to use the $counter variable later on in the script.  Does 
anyone know how I can do this in zope?

Thanks,

Jon Erickson