[htmltmpl] problem in patching..
Brought to you by:
samtregar
From: Amit M. <am...@gm...> - 2005-04-28 10:17:09
|
Hi,=20 I hv installed HTML-Template-2.7, further i tried to use it via my program it is not working correctly. I tried to see the e.g. program then it also wont show any o/p in the brows= er.=20 I hv checked, the prog is executable with proper headers My perl code is as given below.... #!/usr/bin/perl -w use HTML::Template; use Data::Dumper; print "Content-type: text/html \n\n"; # open the html template my $template =3D HTML::Template->new(filename =3D> 'testTemplate.tmpl'); # fill in some parameters $template->param(HOME =3D> 'My HOME'); $template->param(PATH =3D> 'My HOME PATH'); #print "Dumper is " . Dumper[$template]; # send the obligatory Content-Type and print the template output #print "Content-Type: text/html\n\n", print $template->output; exit 0; My template is 'testTemplate.tmpl' & it is written as follows : <html> <head><title>Test Template</title> <body> My Home Directory is <TMPL_VAR NAME=3DHOME> <p> My Path is set to <TMPL_VAR NAME=3DPATH> </body> </html> ############ What might be the Error ........... Can u give me some idea..=20 Thanks & Regards=20 AmitSM. |