According to www.pcwebopaedia.com, a CGI program is defined as:

"A CGI program is any program designed to accept and return data that
conforms to the CGI specification"

In short Perl is a language and CGI is not.  CGI is an interface that allows
you to transfer information between a CGI program and the webserver.

So yes, you can use your Perl scripts as CGI scripts... just as long as they
pring the proper content type headers.

Here is a Perl script:

print "Hello World";

Here is a CGI script:

print "Content-type: text/plain\n\n";
print "Hello World";

Beyond the content type you also need to learn how to grab form/querystring
data since a CGI script does not take any input from the command line.

Rob


-----Original Message-----
From: Naveen Parmar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 05, 2002 5:31 PM
To: [EMAIL PROTECTED]
Subject: Perl and CGI


What are the differences between Perl and CGI? Can I simply rename Perl 
files to .CGI and use them?

What is the crossover from Perl to CGI?

TIA,
- NP



_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to