in reply to Using CGI.pm

CGI.pm has been distributed with perl since about 5.6.1 I believe, so it may be installed in your system already. My CGI.pm is a little rusty, but try:
use CGI qw/:standard/ ; print header() ; print start_html() print "Hello World" print end_html() ;
as a CGI script and see if it works. You'll get an "Internal Server Error", and an entry in the error log saying something to the effect of "could not locate CGI.pm" if CGI.pm is not there.

Replies are listed 'Best First'.
2Re: Using CGI.pm
by jeffa (Bishop) on Nov 18, 2003 at 16:03 UTC
    Why so many print's?
    print header, start_html('Hello World'), p('Hello World'), end_html, ;
    works just as well and is not only cleaner, but less prone to typos ... and by the way, the example you give is missing some important delimiters. Please check your code before you post or disclaim it with "untested".

    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)
    
Re: Re: Using CGI.pm
by CountZero (Bishop) on Nov 18, 2003 at 16:50 UTC
    Even if CGI.pm is part of your set-up, you might still get errors or other weird behaviour of your script, if you do not put your script in the right folder. Check with your sys-admin or web-admin where to place your scripts. At the same time ask him whether CGI.pm is installed (and if so, what version).

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law