Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re: How to iterate by fives?

by moof1138 (Curate)
on Feb 15, 2003 at 23:14 UTC ( [id://235623]=note: print w/replies, xml ) Need Help??


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 = (); } }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://235623]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-03-29 15:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found