my $template = $self->load_tmpl('acc.html'); $template->param($errs) if ref $errs; ##Validate input $template->param( MONTH => $monthName, YEAR => $whichYear, ACC => $acName, LEFT => $lstring, f0 => $data[0], f1 => $data[1], ... ... f..n => $data[..n], ); return $template->output;