in reply to The %ENV{} hash...

The %ENV hash is deeply magical, and is implemented in whatever mechanism your operating system uses to handle environment variables. Think of it as a tied variable.

In the case of Unix systems, environment variables are inherited by a child process in a fork(). VMS is a more extreme case, with %ENV corresponding to a combination of logical name tables and DCL symbol tables, see perlvms for the gory details.

--

Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)

Replies are listed 'Best First'.
Re^2: The %ENV{} hash...
by ikegami (Patriarch) on Jul 31, 2006 at 15:35 UTC

    In context:

    In Windows, the environment is passed down by the parent process on creation of the child process. In this case, the parent process is the web server. %ENV simply accesses this environment and works without knowing the meaning of any variables in the environment. Perl simply works with whatever the web server provides. Any differences in the environments are caused by differences in the web servers and/or their configurations. That (not in Perl) is where you should be focusing your efforts.

    By the way, AUTH_USER and HTTP_PROXY_USER are extentions to (i.e. not part of) the CGI standard.