Click to See Complete Forum and Search --> : perlcode counter help


jrthor2
04-01-2003, 09:34 AM
I'm not sure anyone can help here, but I thought I'd try. I am using the Coranto news program to post things on my website. I am setting up a news scroller script to be dynamically generated through this. The program uses perlcode. I have a counter ($counter++), which increments with each news headline I have. I counter currently starts with 1, but I need it to start with 0. How can I do this?

Thanks!!

Nedals
04-01-2003, 12:02 PM
There must be more to this question than meets the eye!

$counter = 0; # near the top of your code.
$counter++; # after you process the value.