On May 26, Manoj Jacob said:

>I've done some programming in perl mainly for web oriented stuff....
>There's one thing i've always wanted to understand...Sometimes the perl
>program ends with .pl and sometimes .cgi....maybe i'm a very bad programmer
>and i'm really dumb that i've not understood the difference. But what is the
>difference between a file that has .pl extn and a file that has .cgi extn.

Technically, .pl files are "perl libraries" -- ones that you
require() into a program.  Perl programs themselves don't need an
extension at all, but some people prefer .plx is used, if any.

.cgi is used to signify that the program (no matter what language it is
written in) is supposed to be executed from a browser -- that the program
is expecting to be accessed via CGI.

Many web servers, though, can be told that a given directory contains ONLY
CGI programs, so that no extension (or ANY extension) can be used.

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
Are you a Monk?  http://www.perlmonks.com/     http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc.     http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter.         Brother #734
** I need a publisher for my book "Learning Perl's Regular Expressions" **

Reply via email to