### in my code my $foo = $cgi->param('foo'); # do a bunch of things with $foo, # get data out of SQLite, # prepare html output, print "Content-Type: text/html\n\n", $template->output; ### in my template