use Tie::Cycle; tie my $color, 'Tie::Cycle', [qw(red green blue)]; for my $row (@rows){ print qq{<tr bgcolor="$color">$row</tr>\n}; }
But normally you use a template anyway...
In reply to Re: Alternating colors for HTML Table's
by moritz
in thread Alternating colors for HTML Table's
by narainhere
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |