Getting All the Environment Variables of the Server

naveen's Avatar author of Getting All the Environment Variables of the Server
This is an article on Getting All the Environment Variables of the Server in Perl.
Below is a small Perl code that Shows all the environment variables of the Server on which it is run.

Code: PERL
#!/usr/bin/perl
   
   print "Content-type: text/html\n\n";

   print "<tt>\n";
   foreach $key (sort keys(%ENV))
   {
      print "$key = $ENV{$key}<p>";
   }
just call the perl file containing he above code in the browser after setting the appropriate permissions.