in reply to using templates
...and some code to use the template:<HTML> <HEAD> <TITLE>Test Template</TITLE> </HEAD> <BODY> My Home Directory is <TMPL_VAR NAME="home">. My Path is set to <TMPL_VAR NAME="path">. </BODY> </HTML>
Update: Fixed Template::Toolkit link, thanks zigdon.use HTML::Template; # open the HTML template my $template = HTML::Template->new(filename => 'test.tmpl'); # fill in some parameters in the template $template->param(home => $ENV{HOME}); $template->param(path => $ENV{PATH}); # send the obligatory Content-Type print "Content-Type: text/html\n\n"; # print the template print $template->output;
|
|---|