Click to See Complete Forum and Search --> : Is Perl the same as CGI


A_O
10-18-2004, 09:57 PM
okay for all the experts out there, this is a dumb question. but the server hosting my site only supports CGI scripts and not PHP/ASP.

I know Perl is a CGI script, so would it be supported by the server? Thanks.

Jona
10-18-2004, 11:42 PM
A CGI could be a PHP or an ASP script, not just a Perl script; Perl is just the most common. See <http://www.html-faq.com/cgi/?cgiperl>.

Paul Jr
10-18-2004, 11:45 PM
Hmmm... I always thought CGI was an interface through which languages like Perl can (and other such programming languages) communicate with the server. Why would you want to write a CGI script in ASP or PHP? Unless I misunderstand the point of CGI, it seems pointless and redundant. :confused:

Jona
10-18-2004, 11:52 PM
Originally posted by Paul Jr
Hmmm... I always thought CGI was an interface through which languages like Perl can (and other such programming languages) communicate with the server. Why would you want to write a CGI script in ASP or PHP? Unless I misunderstand the point of CGI, it seems pointless and redundant. :confused:

You're exactly right about what it is. I'm too tired to think about it at the moment in any further depth; maybe Jeff will come in here and explain the whole thing better...

chrisranjana
10-19-2004, 05:19 AM
a CGI script can be written in perl or c++ or whatever language you deem fit !

A_O
10-19-2004, 07:14 AM
wow, i was hoping for a simple "yes" or "no" :)

okay, i'm still confused. since my server supports CGI, can I use ASP to make scripts? Can I use Perl to script? Which one would be recommended? Thanks for all your help.

NogDog
10-19-2004, 08:37 AM
Originally posted by A_O
wow, i was hoping for a simple "yes" or "no" :)

okay, i'm still confused. since my server supports CGI, can I use ASP to make scripts? Can I use Perl to script? Which one would be recommended? Thanks for all your help.
You'll want to talk to your ISP. You can only use Perl, for instance, if they have a Perl interpreter installed and running. The same goes for any other interpreted language (such as PHP). Even if you want to use a compiled language (such as C or C++), you will either need access to the appropriate compiler on their server, or else be able to compile locally on the same type of machine/OS in order to create an executable which you could then upload to the cgi-bin directory.

If Perl is a valid option, you cannot really go wrong by learning how to use it: it is a very powerful language and is widely used and supported.

Jeff Mott
10-19-2004, 10:21 AM
The simple answer is yes, almost certainly.

You can read the longer answer if you want in an older thread.
http://www.webdeveloper.com/forum/showthread.php?threadid=28732