in reply to cgi theory

a thing i always do at the begining of a cgi is:
print "Content-type: text/html\n\n";
if you whant to use the cgi module you can do this:
use CGI; my $cgi = new CGI; print $cgi->header( "text/html" ); .... do stuff here .... print $cgi->end_html;
maybe you want to take a look in the O´Reilly Perl CGI book.
it will teach you clean perl/cgi and O´Reilly books are always worth the price when it comes to Perl.

so, have a nice time coding perl...

Replies are listed 'Best First'.
2Re: cgi theory
by jeffa (Bishop) on Sep 16, 2003 at 15:04 UTC
    If you want to use the CGI.pm module but only to print a header you can do this:
    use CGI qw(header); print header;
    Note that calling header() without any arguments returns the header for an HTML file.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)