in reply to list of all the $env variables

If your question is targeted to CGI-programming you might find the ubiquitous env.pl script useful:
#!/bin/perl print "Content-type: text/html\n\n"; print "<HTML>\n"; print "<TITLE>Server-provided Environment variables</TITLE>"; print "<BODY>\n"; print "<TABLE>\n"; print "<TR><TD colspan=2 align=center>Environment Variables</TD></TR>\ +n"; foreach my $x (keys %ENV) { print "<TR><TD>$x</TD><TD>$ENV{$x}</TD></TR>\n"; } print "</TABLE></BODY></HTML>\n";
Put it in your cgi-bin (if it's not already there, I think it comes default with apache). Be sure it is executable by the user the webserver runs as. Otherwise google for an active env.pl on somebody elses webserver.

Replies are listed 'Best First'.
•Re: Re: list of all the $env variables
by merlyn (Sage) on May 08, 2004 at 20:12 UTC
      Being really lazy (being a virtue, yada yada), I just cut-and-paste the first env.pl I found googling. I agree doing this text/plain is way better.
        Kind of OT, but you could even use map, it's fun stuff.

        #!/usr/bin/perl -w use CGI qw(header); print header('text/plain'); print map { "$_ => $ENV{$_}\n" } sort keys %ENV;

        --
        A conclusion is simply the place where someone got tired of thinking.