http://www.perlmonks.org?node_id=127431


in reply to td() and Tr() inCGI.pm

I agree with using HTML::Template if you can.
That said, I've done something like that, and I just concatenated the td() together.
my $graph = $q->img({-src=>"blank.gif", -alt=>"$percentage\%"}); my $graph_table = $q->table({-width=>'100%'}, $q->Tr([ $q->td({-height=>10, -width=>"${percent_label}\%"}, [$graph]) . $q->td({-height=>10, -width=>(100-$percentage).'%'}, [$graph]) ]));