or a little less verbose and (imho :) ) even more readable:
my $odd; my $class; while( $pointer = $sth->fetchrow_hashref ) { $class = ($odd ^= 1) ? "odd" : "even"; ## ... }
In reply to Re^2: Odd and even table rows
by GrandFather
in thread Odd and even table rows
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |