pelase relate PERL and CGI

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
ravi-shekharAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
rpzConnect With a Mentor Commented:
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
 
adg080898Connect With a Mentor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.