Kaye and Geoff's web page documentation 

Perl script to show the environment variables

The following Perl code returns the environment variables which are set as part of the interaction between the browser and the web server, in alphabetic order:

#! /usr/bin/perl # # displays environment variables # print "Content-type: text/html\n\n"; print '<html><head><title>Environment variables</title></head>'; print '<body bgcolor="#ffffff">'; print '<pre>'; for $key (sort keys %ENV) { print "$key=$ENV{$key}\n"; } print '</pre>'; print '</body></html>';
Top
Close