Or you could use HTML::Template and use its loop even/odd markers.
Perl 6 in German
In reply to Re: Odd and even table rows by moritz in thread Odd and even table rows by Anonymous Monk