[% count = 0; WHILE ($sth->fetchrow_arrayref) %] [% IF ($count % 2) %] print "something"; [% ELSE %] print "something else"; [% END %] count++; [% END %]
Yes, that's correct.
And, if you're trying to print alternating background colors for your rows, please just set a variable for the color, rather than having two nearly identical print statements.
Further, printing background colors is an ideal use of Tie::Cycle.
xoxo, Andy
-- Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance
_______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates
