in reply to A question regarding HTML::Template, tables, and loops
Hi. You'll want to check out jeffa's reply to one of my own questions.
This little snippet is the key:
HTH.
This little snippet is the key:
which returns this:use strict; use Data::Dumper; my ($i,$j) = (0,0); my $tab; for (0..10) { push @{$tab->[$j]},$_; $j++ unless ++$i % 4; } print Dumper $tab;
You could then just nest a loop within a loop.$VAR1 = [ [ 0, 1, 2, 3 ], [ 4, 5, 6, 7 ], [ 8, 9, 10 ] ];
HTH.
In Section
Seekers of Perl Wisdom