DigitalKitty has asked for the wisdom of the Perl Monks concerning the following question:
Hi.
In experimenting with the HTML::Template module, I have experienced a small problem:
<html> <head> <title><TMPL_VAR NAME="THAT_FAMOUS_STRING"></title> </head> <body> <b><TMPL_VAR NAME="THAT_FAMOUS_STRING"></b> </body> </html>
#!/usr/bin/perl -w use strict; use lib qw(/home/kmiller/lib/); use HTML::Template; my $that_famous_string = "Hello, World!"; my $template = HTML::Template->new(filename=>'test.tmpl'); $template->param(THAT_FAMOUS_STRING=>$that_famous_string); print "Content-type: text/html\n\n"; print $template->output;
Content-type: text/html <html> <head> <title>Hello, World!</title> </head> <body> <b>Hello, World!</b> </body> </html>
#!/usr/bin/perl -w use strict; use lib qw(/home/kmiller/lib/); use HTML::Template;
janitored by ybiC: Balanced <readmore> tags around example code sections
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTML::Template / Apache problem.
by dws (Chancellor) on Dec 28, 2003 at 06:22 UTC | |
|
Re: HTML::Template / Apache problem.
by bassplayer (Monsignor) on Dec 28, 2003 at 06:34 UTC | |
by DigitalKitty (Parson) on Dec 28, 2003 at 07:28 UTC | |
|
Re: HTML::Template / Apache problem.
by stvn (Monsignor) on Dec 28, 2003 at 21:07 UTC |