in reply to Dynamic Tables in CGI.pm

I'll take you one step further, moving the row definitions up top and defining an array ref to put the rows into. You should be able to put the "push" lines in a for loop from here.

Good luck.

my $rowRef = [th(['Vegetable',Breakfast','Lunch','Dinner'])]; push @$rowRef, td(@Data1); push @$rowRef, td(@Data2); push @$rowRef, td(@Data3); ... print $query->table({-border=>undef}, caption('When Should You Eat Your Vegetables?'), Tr({-align=>"CENTER",-valign=>"TOP"}, $rowRef ) );

Replies are listed 'Best First'.
Re^2: Dynamic Tables in CGI.pm
by echoangel911 (Sexton) on Aug 16, 2006 at 13:21 UTC
    looks good! i will try it