I added the content header line, and it does not work with that in there. I am pointing to the results.tmpl file which is in the same folder as the the .pl script. I found another test script on the web on another website, and I have the same problem -- the tags are not replaced with the information in the script. Could it be a permission issues on the .tmpl file or the .pl file?
-----Original Message----- From: fliptop [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 12:59 PM To: Hughes, Andrew Cc: '[EMAIL PROTECTED]' Subject: RE: cgi.pm generate html vs. print <<EndOfHTML; On Thu, 16 Jan 2003 at 11:49, Hughes, Andrew opined: HA:Thanks for the feedback. Before I get started on the html::template HA:tutorial, I wanted to try a quick sample page using html::template. HA:However, when I try it, I cannot get the tag in the html to process. Could HA:someone take a look and let me know what you think I am doing incorrectly? HA: HA:my $template = HTML::Template->new(filename => 'results.tmpl'); HA:$template->param(SECRET_MESSAGE => $bar); you should probably print "Content-type: text/html\n\n"; here. HA:print $template->output; HA: HA:######################################## HA: HA:This is the .tmpl file: HA: HA:<!-- results.tmpl --> HA:<html> HA:<head> HA:<title>Untitled Document</title> HA:<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> HA:</head> HA: HA:<body bgcolor="#FFFFFF" text="#000000"> HA:<h1>Hello <TMPL_VAR NAME=SECRET_MESSAGE></h1> HA: HA:</body> HA:</html> HA: HA:######################################## HA: HA:When I view the source of results I see the tag "<TMPL_VAR HA:NAME=SECRET_MESSAGE>" where I expect to see "World". are you pointing to the perl script with your browser (and not the template file)? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
