Solved

pelase relate PERL and CGI

Posted on 2004-08-02
4
471 Views
Last Modified: 2010-04-17
I need to learn PERL. i got perl.org and perl.com
pelase can you relate PERL and CGI. how are they related and how are they different...... furthermore, i know c, c++, vc++, java, vb, asp, html, javascript, .... any relation of PERL with there. what abt PHP where does PHP stand when we talk abt PERL and CGI.

pelase help
rs
0
Comment
Question by:ravi-shekhar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Accepted Solution

by:
rpz earned 25 total points
ID: 11692868
Perl (Practical Extraction and Report Language) is an interpreted scripting language. Perl is a very powerful language that has borrowed from a variety of different programming languages. This makes Perl very powerful, but also quite hard to learn and very hard to read. It can be used for anything from shell scripts to server-side web applications. A good interpreter for Windows is ActiveState (http://www.activestate.com/).
CGI stands for Common Gateway Interface, and is a way for the web server to communicate with programs on the server (the programs can be scripts written in Perl, as well as other languages). CGI was created in the early days of WWW and works by executing a certain program and setting up some environment variables specific to the HTTP request. Microsoft IIS uses a different approach for server-side scripting called ISAPI, where each scripting language is a special DLL instead of a generic program.
CGI has nothing directly to do with Perl, other than that CGI scripts were traditionally written in Perl.
PHP (http://www.php.net) is another scripting language, one that is focused on web applications (although it could be used for other scripts as well). It is similar in functionality to ASP, but instead of being based on Visual Basic, PHP is not entirely unlike C++.
Both PHP and Perl can be used with the most popular Web servers like Apache and IIS. One good way of experimenting with Perl or PHP is to download a small web server to your desktop computer, for example this open-source java-based app (http://www.javascript.nu/xerver/).
0
 
LVL 8

Assisted Solution

by:adg080898
adg080898 earned 25 total points
ID: 11698585
Before CGI, the only thing webservers did was send files (web pages) on request. There was no ability to run a program to generate a response.

CGI is a way for the webserver to run a given program and send IT'S OUTPUT as the page. Anything can run can be run by CGI, for example, a compiled C or C++ program, a shell script, perl, etc..., or any language for which there is an interpreter available.

CGI defines a standard way for the launched program to get information about the request. The program writes its output to standard output. The webserver sends the output of the program as the response to the client requesting the page.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A short article about problems I had with the new location API and permissions in Marshmallow
This is about my first experience with programming Arduino.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question