[Gllug] Perl question, but it is a linux server!

James Tullett jamest at iotia2.demon.co.uk
Sat Mar 29 15:51:39 UTC 2003


On Friday 28 March 2003 11:20, Adrian McMenamin wrote:
> Well, the page on CPAN says the support is partial and I found it very
> difficult. I use CSS so I just use 'raw' perl to do most of the output. It
> does seem to support xhtml transitional though.
>
Here's some code I did earlier:-
my $request = new CGI();
my $cgi = new CGI();

print $cgi->header( -type=>'text/html' );
print $cgi->start_html(-style=>{'src'=>'/styles/fred.css'} );

# more Perl ....

If all else fails, then there is 

print <<HTML_HEADER;
Content-type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <title>Sorry, Help File Not Found.</title>
    <link href="/styles404.css" type="text/css" rel="stylesheet">
  </head>
HTML_HEADER

You can of course, interpolate variables in the here document in the second 
example, to customise content appropriately.
--
James



-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list