http://www.perlmonks.org?node_id=838661


in reply to Alternating Table Row Colors Help!

Another way to do this, is to first process the @$sql array and get all the unique users. You can then loop over the unique users and use $i as intended.