WebDeveloper.com �: Where Web Developers and Designers Learn How to Build Web Sites, Program in Java and JavaScript, and More!   
Web Developer Resource Directory WebDev Jobs
Animated GIFs
CSS
CSS Properties
Database
Design
Flash
HTML
HTML 4.01 Tags
JavaScript
.NET
PHP
Reference
Security
Site Management
Video
XML/RSS
WD Forums
 Client-Side
  Development

    HTML
    XML
    CSS
    Graphics
    JavaScript
    ASP
    Multimedia
    Web Video
    Accessibility
    Dreamweaver
    General
    Accessibility
    Dreamweaver
    Expression Web

    General

 Server-Side
  Development

    PHP
    Perl
    .NET
    Forum, Blog, Wiki & CMS
    SQL
    Java
    Others

 Site Management
    Domain Names
    Search Engines
    Website Reviews

 Web Development
  Business Issues

    Business Matters

 Etc.
    The Coffee Lounge
    Computer Issues
    Feedback




Beginners Guide to CGI in Perl

by Nathan Poole

This article, or tutorial if you will, is designed to teach you some very basic lessons in programming Perl (Practical Extraction and Report Language). This will not make you a professional, and certainly isn't resume worthy. Perl is a very friendly language and my intent is to make that clear for everyone who hasn't had the opportunity to try it out. This tutorial was built with the idea that Windows95/98/NT users would be using it. We will be working with Perl in MS-DOS, Perl will be installed, and you'll be making a few simple programs. I'm not suggesting I can compare to the many great books availble on Perl, two notable ones are "Learning Perl 2nd Edition" and "Effective Perl Programming". These titles can be found at www.fatbrain.com.

What Can Perl Do For You?

The question is more, what can't it do for you. No, it can't drive the kids to soccer practise or please your signaficant other, but it can make your web life a lot easier. With CGI (Common Gateway Interface) you can create programs to update your webpage, allow users to send you email, check errors, and pretty much anything else you can think of. There are very few limitations. How does CGI chalk up to other languges such as javascript? Javascript is very good in what it does. It's a terriffic language, but it doesn't have the ability to do what CGI can, nor does CGI have the abililty to reproduce Javascript's effects. The bottom line is, use what you need. I wouldn't use HTML for updating a file, as I wouldn't use XML to create graphics.

Perl Tools

Perl is probably the most widely used programming language for CGI. To start you off learning Perl, I feel obligated to give credit where credit is due. First off, to Larry Wall for creating Perl itself. Secondly, thanks must be given out to Randal L. Schwartz and Tom Christiansen (in no particular order!) for writing some of the best Perl documentation ever published. You can always see their work at the bottom of this page in the Books Index section. - Tools First off, to program in Perl I suppose it would be a smart idea to download Perl itself. If you're running Windows95/98/NT you run Perl through MS-DOS. First, for Win32 users, click the link below to download Perl for Win32 by ActiveState.

Pw32i316.exe (1,511 KB) (Perl for Win32 Intel/x86 binary)

After you've download the preceding file, extract it on your machine. It creates the directory C:\Perl and that's all there is to it. You've now installed Perl. You'll need to reboot your machine.



HTML5 Development Center


Recent Articles