in reply to Odd and even table rows

You can use $class = ($i % 2 == 0) ? 'even' : 'odd'.

Or you could use HTML::Template and use its loop even/odd markers.

Replies are listed 'Best First'.
Re^2: Odd and even table rows
by aufflick (Deacon) on Aug 09, 2007 at 04:15 UTC
    or even $class = $i % 2 ? 'odd' : 'even'; - I use this often enough that I think it's clear what's happening without the explicit == 0