#!/usr/bin/perl -w # Perl script to display CGI environment variables # © 2004 Jonathan Hedley -- http://jon.hedley.net/ # Installation instructions: # 1) Set the first line of the script to the path of your perl interpreter. # (E.g. #!/usr/bin/perl or #!/usr/local/bin/perl or some such # 2) Change the filename extension as applicable to your server environment. # (E.g. rename this file to env.pl or env.cgi) # 3) Upload / copy to a directory of your web server that executes CGI scripts. # Ensure you use the correct line endings for your platform (use ASCII mode) # 4) Make it executable (e.g. set permissions to 755 or a+x) # 5) Visit in your browser. # 6) If you get errors, check your server's error log. use strict; # Start outputting. No MVC here. print "Content-Type: text/html\r\n\r\n"; print qq[
| $key | $ENV{$key} |
|---|---|
| Effective UID | $> (]. getpwuid( $>) . qq[) |
© 2004 Jonathan Hedley
];