Prepend the code below to an HTML file then drop it into the CGI script folder to get served up using the file name in the URL. For example drop index.html into the directory where your CGI scripts are, prepend the header and access it as http://dibbly.wobbly.com/cgi-bin/index.html
Update: add missing use HTML::Template. But see replies in any case! (One ought not rush to print!)
#!Perl -w use strict; use CGI::Pretty qw(:standard :cgi-lib); use HTML::Template; print header(); my $template = HTML::Template->new (filehandle => *DATA); print $template->output (); __DATA__
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl header to serve up a .HTML file from a CGI directory
by davorg (Chancellor) on Mar 13, 2007 at 10:13 UTC | |
by ambrus (Abbot) on Mar 18, 2007 at 15:36 UTC | |
by GrandFather (Saint) on Mar 13, 2007 at 10:17 UTC | |
by davorg (Chancellor) on Mar 13, 2007 at 10:19 UTC | |
|
Re: Perl header to serve up a .HTML file from a CGI directory
by hangon (Deacon) on Mar 14, 2007 at 10:08 UTC | |
|
Re: Perl header to serve up a .HTML file from a CGI directory
by graff (Chancellor) on Mar 14, 2007 at 03:31 UTC | |
by GrandFather (Saint) on Mar 14, 2007 at 04:02 UTC |