[boulder.pm] CGI.pm basics

Walter Pienciak walter at frii.com
Thu Jan 20 15:38:52 CST 2000


On Thu, 20 Jan 2000, Jason Van Slyke wrote:

> 
> So, you are looking for activity?!
> 
> Ok, I have a small project that begs to build an html table report. Since
> this project is small and not in a hurry I'd like to tinker with CGI.pm. Is
> there a decent tutorial/book anyone can recommend. CGI Programming with
> Perl, 2nd Edition isn't due out now until 6/2000.
> 
> Thx, Jason

Of course there's the canonical "man CGI", where you bootstrap yourself
up with kind of a cargo-cult programming approach.

The basic program can be as simple as

#!/usr/bin/perl -wT

use strict;
use CGI;
$ENV{PATH} = "";

my $q = CGI->new();
print $q->header();

print <<"EOT";
<html>
<head><title>Woo-hoo!</title></head>
<body>
<p>All kinds of fun!</p>
</body></html>
EOT

exit;
## Th-th-that's all, folks!


Anyway, the CGI references I usually point at are:

http://www.perl.com/pub/doc/FAQs/cgi/perl-cgi-faq.html
http://www.perl.com/pub/doc/FAQs/cgi/www-security-faq.html
ftp://ftp.cs.colorado.edu/mirrors/CPAN/doc/FAQs/cgi/idiots-guide.html

I have a somewhat-old copy of a tutorial book on Intro CGI by Tom
Christiansen, but someone has it at the moment.

I'd recommend just jumping in after looking through the docs at those
URLs.  (I assume you have a web server you can run your scripts on.)
Write a bunch of goofy programs.  When you get stuck, ask.  Nobody
skips the learning curve.

Walter




More information about the Boulder-pm mailing list