moof1138 has asked for the wisdom of the Perl Monks concerning the following question:
my $productcount = 0;#index of which product we are using print $q->table({-border=>1}); foreach (@champarray){# go through each item. my @rows; my @tmp_row_items = $q->p($champarray[$productcount][0]);#item 0 i +n array is the name of our item my $itemnum = $#{$champarray[$productcount]}; my $rownum = ceil($itemnum / 5);#ceil is POSIX round up function 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))); } push (@rows, $q->td(@tmp_row_items)); print $q->Tr(\@rows); $productcount++; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to iterate by fives?
by boo_radley (Parson) on Feb 15, 2003 at 22:53 UTC | |
by moof1138 (Curate) on Feb 15, 2003 at 23:14 UTC | |
Re: How to iterate by fives?
by BrowserUk (Patriarch) on Feb 15, 2003 at 23:18 UTC | |
Re: How to iterate by fives?
by Coruscate (Sexton) on Feb 15, 2003 at 23:31 UTC | |
by moof1138 (Curate) on Feb 16, 2003 at 00:25 UTC | |
by DapperDan (Pilgrim) on Feb 17, 2003 at 00:00 UTC | |
by LAI (Hermit) on Feb 17, 2003 at 15:49 UTC | |
Re: How to iterate by fives?
by caedes (Pilgrim) on Feb 15, 2003 at 22:37 UTC | |
by ilcylic (Scribe) on Feb 16, 2003 at 00:56 UTC | |
by moof1138 (Curate) on Feb 16, 2003 at 21:10 UTC | |
Re: How to iterate by fives?
by zengargoyle (Deacon) on Feb 17, 2003 at 16:14 UTC |