in reply to CGI , HTML

Well, one thing you could do is load the page into a variable, and then regex yourself some special tags, like such:

$htmlsource =~ s/<title>/$title/g; But if you're getting a lot of page hits, that's a *bad* thing. Another cheap option is to include the page source within its own '.cgi' file and "requre" it.

#INSIDE HEADER.CGI print " <html> <head> <title>$title</title> </head> </body> "; } #INSIDE INDEX.CGI require "header.cgi";

this is a bit faster but a bit more cumbersome to incorporate page design into. Then there's always HTML::Template, but I dont have the permissions on my server to try it out. Anyhoo, tha'ts alls I gots.

Replies are listed 'Best First'.
Re: Re: CGI , HTML
by freddo411 (Chaplain) on Oct 24, 2003 at 21:03 UTC
    Actually, if you have permissions to put any perl script up on your web site, then you have permissions to put up Modules, just not in the "normal" place.

    Try this:
    * make a dir called myModules
    * make a dir called HTML inside it
    * copy Template.pm into it from CPAN (or do it the proper way and have the installer install into your myModules dir)
    * In your script do:

    # use lib "myModules"; #this example uses a relative path use HTML::Template; # do real stuff here

    -------------------------------------
    Nothing is too wonderful to be true
    -- Michael Faraday