use CGI ':standard'; use HTML::Table; my $table = new HTML::Table; foreach my $thing (@thingies) { my ($name,$cost,$number) = GetThingInfo($thing); $table->addRow( checkbox('checkboxname'), $name, $cost, $number, textfield('textname'), ); } $table->print;