##############The perl Code<!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_na +me>! 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>
#!/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();
In reply to HTML::Template - can't display the tmpl by atnonis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |