#!/usr/bin/perl -w use HTML::Template; my $template = HTML::Template->new(filename => 'test.tmpl'); $template->param(TEXT => "Hello World"); print "Content-Type: text/html\n\n", $template->output; ####

There you go a modified version of Corion's script using HTML::Template.