Disclaimer: I haven't tested this code but this should give you some ideas
my @colors = [ qw ( red blue ) ]; foreach my $ix(0..$#data) { printf "<td><font color=\"%s\">%s</td>", $colors[($ix % 2)],$data[$ix]; }
If it is the background color you are trying to modify substitute "<td>" with "<td bgcolor="%s">".
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Peter L. Berghold --- Peter@Berghold.Net "Those who fail to learn from history are condemned to repeat it."
In reply to Re: alternating row colors
by blue_cowdawg
in thread alternating row colors
by qball
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |