CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [sunrise11] Need to change browser's title for one page: Edit Log



Zhris
Enthusiast

Apr 11, 2011, 7:12 PM


Views: 6345
Re: [sunrise11] Need to change browser's title for one page

The template module Fishmonger suggested. It allows you to place a few special tags inside your HTML code, which will be replaced with your chosen values before printing:


Code
<html> 
<head>
<title><TMPL_VAR NAME=TITLE></title>
</head>
<body>



Code
use HTML::Template; 

my $template = HTML::Template->new(filename => 'Header.html');

$template->param(TITLE => 'This is the page title');

print "Content-Type: text/html\n\n", $template->output;


Chris


(This post was edited by Zhris on Apr 11, 2011, 8:00 PM)


Edit Log:
Post edited by Zhris (Enthusiast) on Apr 11, 2011, 7:12 PM
Post edited by Zhris (Enthusiast) on Apr 11, 2011, 8:00 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives