sub tableHTML { my %table_data = @_; my $template = HTML::Template->new(filename => 'table.tmpl'); $template->param(%table_data); return $template->output; }