On Thursday 07 June 2001 16:53, Bradshaw, Brian wrote:
> Hi list.
>
> I am trying to learn PERL and decipher some code somone else wrote. I have
> the code snip -- $ENV{'QUERY_STRING'} --
> I have not found this in the archives, so I am hoping someone will answer
> this:
>
> I cannot figure out exaclty what the ENV is.The book says it contains the
> current environment. OK, but what is in this environment. I can't find info
> what the environment consists of. What does the 'Query_String' mean?
>
> Please help me out? Thanks in advance.
>
Every running process has it's own "environment". Environment is a set of
variables, each of which has a name and a value. In a Unix shell, you can
find out what's your current enviroment by invoking 'set' command.
The QUERY_STRING variable is set by WWW server when CGI script is executed.
In the variable, CGI script can find the URL that was used to invoke it, i.e.
it's internet address. Sometimes, it also contains parameters.
BTW: if you have a script that accesses query string directly, it's probably
quite old-fashioned. Modern CGI scripts usually use CGI module, which
provides all the tools for accessing useful data in the query.
--
Ondrej Par
Internet Securities
Software Engineer
e-mail: [EMAIL PROTECTED]
Phone: +420 2 222 543 45 ext. 112