#!/usr/bin/perl ########################################################################### # environment_variables.cgi # # # # This script was written by Selena Sol (selena@eff.org # # http://www.eff.org/~erict) having been inspired by countless other # # perl authors. Feel free to copy, cite, reference, sample, borrow or # # plagiarize the contents. However, please let me know where it goes so # # that I can at least watch and take part in the development of the # # memes. Information wants to be free, support public domain freware. # # # # Version: 2.0 # # Last Modified: 5-12-96 # # Description: This script will output all of the environment variables # # available for use # # Usage: This script must be placed in a directory which allows cgi # # executables and must have its permissions set such that the web # # server has permission to execute it. # # # ########################################################################### # First, print out the HTTP header. print "Content-type: text/html\n\n"; print "Current Time : ".localtime(time())."
\n";
# Create a list of environment variables by gathering all the "keys" in the
# %ENV associative array.
@environment_variables = keys (%ENV);
# For ever environment variable in the @environment_variables list, print
# the variable and then print its associated value. Then quit.
foreach $environment_variable (@environment_variables)
{
print "$environment_variable = $ENV{$environment_variable}
";
}
print "