Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); use Template; my $q = CGI; my $tt = Template->new({ INCLUDE_PATH => '../../temp/'}); my $vars = {}; $vars->{'title'} = 'Template Test'; $vars->{'site_name'} = 'TT TEST Page'; print $q->header(); print $tt->process('page.tt', $vars) || die $tt->error(); exit 1;
Thanks for the explanation!<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>[% title %]</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1 +"> </head> <body> <p>[% site_name %]</p> <br> Test Page <br> </table> </body> </html>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing a strange 1 on page.
by ikegami (Patriarch) on Dec 15, 2011 at 04:10 UTC | |
by Anonymous Monk on Dec 15, 2011 at 04:14 UTC | |
by NetWallah (Canon) on Dec 15, 2011 at 04:58 UTC | |
|
Re: Printing a strange 1 on page.
by 3dbc (Monk) on Dec 15, 2011 at 03:32 UTC | |
|
Re: Printing a strange 1 on page.
by Alyssaly (Initiate) on Dec 15, 2011 at 07:35 UTC | |
by AnomalousMonk (Archbishop) on Dec 15, 2011 at 08:55 UTC | |
by GrandFather (Saint) on Dec 15, 2011 at 08:13 UTC |