CGI Perl Tutorial

Beginner's Tutorial for CGI Perl Language

Perl or Practical Extraction and Report Language is described by Larry Wall, Perl's author, as follows: "Perl is an interpreted language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for any system management tasks. The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal)." That is the official description whether you understand it or not.

The uses of perl is one of the features that set it apart from other languages. It is used as a CGI(Common Gateway Interface) language, as a shell scripting language, a programming language. It can be used as a client side scripting language for the net. One can create GUI application using Perl/Tk. If all fails you can still change perl a bit and give it to your sweetheart as jewelry. My favorite thing about perl is its extreme ease of use and simplicity. What I could do with a 500 LOC(Lines of Code) C++ program can be done with a 50 LOC Perl program. Its beauty lies in its simplicity.

Now before we start about on this epic journey to where many men has boldly and cowardly gone before, I will try to make you ready for your journey to a bigger world. Before starting, make sure you have the following things. If some are missing you still can learn perl - but you will not be able to use it to its full power.

  1. ActivePerl from for windows - For programming in Windows. Linux don't need any special outside interpreter because it already has it in most of the distributions.
  2. A Good text editor with syntax highlighting support for perl and ability to run script on the interpreter. I would recommend Crimson Editor(
  3. A server capable of handling perl scripts - If you wish to make CGI Perl scripts. I use Sambar Server.

In Unix/Linux you can execute your perl scripts by typing "perl <filename>" at command prompt. If you have ActivePerl, you can execute it by double clicking a perl file in Windows.

Perl Tutorial
Author - Binny V A
Personal Site Binny V A

Home Next