use CGI; use HTML::Template; use strict; my $q = CGI->new(); my $html = do {local $/;}; my $tmpl = HTML::Template->new( scalarref => \$html, associate => $q, ); print $q->header,$tmpl->output(); __DATA__ CGI Test
First Name:
Last Name:
Your age:

Welcome!

We're glad to see you , members of the family are always welcome here. It's hard to believe that you're already years old. My how time flies.