HELPCONTACTDIRECTORYEVENTSNEWSUAF HOME

printenv.pl CGI
(a programmer's tool)

The /cgi-bin/printenv.pl program is a small perl routine which, when invoked, returns the CGI Environment Variables set on the server upon which it was invoked. This little code section can be used to retrieve all of the CGI Environment Variables and print them out (while testing your program). Please note that this code section displays the values it retrieves, which should not be necessary in your final product, but can be very useful while troubleshooting.

print "Content-type: text/html\n\n";
while (($key, $val) = each %ENV) {
        print "$key = $val<BR>\n";
}

UAF

The University of Alaska Fairbanks is an AffirmativeAction/Equal Opportunity Employer and Educational Institution.

Office of Information Technology - PO Box 757700 - Fairbanks, Ak 99775-7700
ph: 907-474-6564 / fax: 907-474-5910

Last modified 08/08/2006
by fxdjl@uaf.edu