Displaying all environment variables like PHP does with phpinfo()
Just update the shebang #!/usr/local/bin/perl with the path to your perl binary and copy this code to something like perlinfo.cgi and execute in a browser.
#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "<ul>\n";
foreach $key (sort keys(%ENV)) {
print "<li><strong>$key</strong> = $ENV{$key}</li>";
}
print "</ul>";
[Click to add or edit comments])
Please prepend comments below including a date