iNET Interactive - Online Advertising Agency
          
   Home    Authors    About    Login    Contact Us
   Search:   
Advanced Search     
  Articles

  ASP (26)
  ASP.NET (19)
  C and C++ (4)
  CFML (2)
  CGI and Perl (16)
  Flash (2)
  Java (7)
  JavaScript (28)
  PHP (92)
  MySQL (13)
  MSSQL (3)
  HTML (34)
  SEO (9)
  Visual Basic (12)
  CSS (13)
  SSI (5)
  XML (12)
  C# (14)

  Developer News

May 17, 2008
Learn HTML forms
About
 
May 16, 2008
Who Are Your Top Friends on Facebook?
About
 
May 15, 2008
Reader Question - Would you host your client's work on your website?
About
 
May 15, 2008
How to Create an Ajax Autocomplete Text Field: Part 6
WebReference.com
 
May 14, 2008
Poll: Are the browser safe colors still needed?
About
 
May 14, 2008
Google Doctype launched
About
 
Courtesy of moreover.com
 
Want to receive new articles via e-mail? Click here!
/Home /CGI and Perl

Introduction to Perl 

  Views:    7833
  Votes:    2
by Spyder Co 3/03/05 Rating: 

Synopsis:

This is an introduction to the Perl language. Learn what it does, what it can and can't be used for, what you need to have to use it, and more.
Pages: 
The Article

What is it?

Perl was one of the first computer languages every written, through it's years of existance the contributers of the language have made it one of the the most robust and powerful languages there are.  Perl is short for Practical Extraction Report Language, because that's what it is.  It creates and extracts data on the fly with remarkable speed.

You will often times hear the words Perl and CGI together as if they're one and the same.  It's safe to think this, as CGI is a module built for Perl, the main difference is CGI is typically OOP (object-oriented programming) while Perl itself usually is not.  CGI is short for Common Gateway Interface which is a great name because it's Perl's interface to work on the web.

What does it do?

Since this is one of the fastest languages there are, this makes a great report processing and retrieval language.  You can parse hundreds of thousands of lines of code from a text file in just a few seconds (I typically can get around 80,000 lines returned in a fraction of a second).

Some very common uses for Perl/CGI: Data extraction, encryption, contact forms, guestbooks, full ecommerce sites, web parsers and web bots, search engines, image manipulation, security.

What can't it do?

It can do nearly anything you can think of when working in strictly Perl on your own computer.  You can create graphics, setup password scripts, encrypt files, track users, etc.  But on the web, it's only limitation is the fact it's a server-side language.

This means that the content created using Perl/CGI is not dymanic; all of it's work is done at the time the page loads.  This is unlike JavaScript which can have content change at any given time.  A simple example of this would be a contact form.  The fields can't be checked or verified on the page that just loaded, the page has to reload or redirect before Perl/CGI can use this information.

What do I need?

If you want to run Perl scripts on your own computer and you're on Windows or Mac, you'll need to download ActiveState Perl.  The link for this can be found in Tutorials section, be sure to always download the latest version.  At the time of writing this article, the latest version is 5.8.6.

To use CGI, you'll either need your own server or a server hosted by another company online.  Your server or web host must allow CGI support. If it doesn't, you will not be able to use web based Perl scripts.  There are many free servers out there that do allow CGI and nearly all paid hosts will.  CGI is a standard which makes finding a worthy host a much simpler task.

Pages: 

Similar/related articles:


 
  Sponsors