my $template = HTML::Template->new(filename => 'wdi.tmpl'); # Later... $template->param(DIRLINKS => "1"); $template->param(CONTENT => "2"); # At the end... $template->output();