Before You Start

To write CGI scripts in Perl, you'll need three things:

  • A Web server that supports Perl and an understanding of how to install CGI scripts on that server

  • The CGI.pm module, which should have come with your Perl distribution (more about this later)

  • A basic understanding of HTML

Note

You don't specifically need the CGI.pm module to write CGI scripts in Perl. There are other utility scripts to help you do CGI, or you could hand-write all of the underlying code yourself. But that would mean a lot of work for you, and it's much, much easier just to use CGI.pm. Everyone else is doing it; why not join us?


Because of the wide variety of Web servers for different platforms and the differences between them, the space isn't available to get into a discussion of getting your Web server set up for CGI. There are extensive help files on the Web, however, including

You should also refer to the documentation that came with your Web server. If you plan to do a lot of work with CGI, you might consider Sams Teach Yourself CGI Programming in a 24 Hours for more help and more examples beyond what is offered here.

If you don't have at least a passing background in HTML, much of the rest of this lesson may be difficult to follow. Again, consider boning up with the multitude of HTML tutorials on the Web, or with Sams Teach Yourself Web Publishing with HTML and XHTML in 21 Days.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset