CGI sends most information concerning an http request from the server to the program via Environment Variables
The hash %ENV contains your current environment. Access an individual variable with $ENV{"variablename"}. Setting a value in ENV changes the environment for any child processes you subsequently fork() off.
See also:
Questions: