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>";

Page Comments (Click to edit)






[Click to add or edit comments])

Please prepend comments below including a date

Design by N.Design Studio, adapted by solidGone.org (version 1.0.0)
Have a nice day.