I tend to use $toggle *= -1;

Update: I stand corrected, thanks LanX. I often use that for alternating rows but it's wrong here.


In reply to Re: Boolean counter? by rowdog
in thread Boolean counter? by DreamT

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":