#!/usr/bin/perl -w # # TWiki Collaboration Platform, http://TWiki.org/ # # Copyright (C) 2005 Peter Thoeny, peter@thoeny.org # # For licensing info read LICENSE file in the TWiki root. # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details, published at # http://www.gnu.org/copyleft/gpl.html # # DESCRIPTION: CGI utility that prints all environment variables # as seen from the webserver. if( $ENV{'DOCUMENT_ROOT'} ) { print "Content-type: text/html\n\n"; print < Environment variables

Environment variables

EOM my $key; for $key ( sort keys %ENV ) { print "\n"; } print < EOM } else { print "Environment variables:\n"; my $key; for $key ( sort keys %ENV ) { print "$key: $ENV{$key}\n"; } } #EOF
$key$ENV{$key}