http://qs321.pair.com?node_id=235623


in reply to Re: How to iterate by fives?
in thread How to iterate by fives?

Thanks! I knew I was missing the obvious here. A modulus did the trick:
for my $i (1 .. $itemnum){ push (@tmp_row_items, $q->td($q->textfield( -name => "$champar +ray[$productcount][0]$i", -default => "$champarray[$productcount][$i] +", -size => 25))); if ($i % 5 == 0) { push (@rows, $q->td(@tmp_row_items)); @tmp_row_items = (); } }