[Athens-pm] HTML::Template....
Antonis Faragitakis
skatoulininis at yahoo.com
Sat Feb 22 06:22:48 CST 2003
Hi everyone!
I can't figure out what is wrong with the following
code:
###################HTML TEMPLATE#####################
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Welcome <TMPL_VAR NAME=user_name> to your
place</title>
<link rel="stylesheet" type="text/css"
href="myplace.css" />
</head>
<body>
<table class="main">
<tr>
<td class="left">
<div class="main" align="justify">Welcome back
<TMPL_VAR NAME=user_name>! We have let you in
<TMPL_VAR NAME=usercount> times!
<hr class="main">
Your access is restricted to <TMPL_VAR
NAME=acclevel> level.</div>
</td>
<td class="center">
</td>
<td class="right">
</td>
</tr>
</table>
</body>
</html>
###################HTML TEMPLATE#####################
###################PERL#####################
#!/usr/bin/perl -w
use strict;
use CGI;
use CGI::Carp qw(fatalsToBrowser);
use HTML::Template;
my $cgi = new CGI;
my $template = HTML::Template->new(filename =>
'head.tmpl');
print $cgi->header;
$template ->param(user_name => 'antonis');
$template ->param(acclevel => 'the bastard');
$template ->param(usercount => '10');
$template->output();
###################PERL#####################
any help!?
Antonis
More information about the Athens-pm
mailing list