in reply to Re^4: CGI program
in thread CGI program

The web server has a configuration file which tells it if a certain program is to be run as a CGI script or not. If the answer is "yes", the web server sets up all these variables before calling the script.
For example, will QUERY_STRING have different name before its named by web server ?

The web server likely has an internal data structure that holds that information - it doesn't matter how that thing is called.

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^6: CGI program
by manishrathi (Beadle) on Sep 24, 2009 at 16:08 UTC
    So when I create a Perl script with the "use CGI" in the script and save this file as say "trialOfCGI.pl", will it be automatically marked as CGI script ? Or do we have to manually mark the script as CGI ? If we save the file with .cgi extension e.g. "trialOfCGI.cgi", does it mark the script as CGI script ? If thats the case, then every CGI script has to be marked with cgi extension only ? When do we use cgi extension for a script ? In the cgi-bin dir, can we put a script without .cgi extension ?
      The webserver controls all that. If it wants .vagina, you need .vagina :)