in reply to How do I get the environment variables for the owner of a CGI script?

Unix: be the owner of the script, type "env". That will show you the environment.

Perl has a hash called %ENV that holds the same... but in case of CGI, that should be either the environment of the webserver process or just the CGI environment from CGI.pm. Look it up in the documentation of CGI.pm.

Update: ...which doesn't even mention it, sadly. You can still print in a html table

foreach my $key ( sort keys %ENV ) { print( Tr( td( $key ), td( $ENV{$key} ) ) ) }

Cheers, Sören

  • Comment on Re: How do I get the environment variables for the owner of a CGI script?
  • Download Code

Replies are listed 'Best First'.
Re^2: How do I get the environment variables for the owner of a CGI script?
by jacques (Priest) on Oct 29, 2004 at 00:13 UTC
    I appreciate every response, but you don't understand my question.