Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Perl (http://www.go4expert.com/articles/perl-tutorials/)
-   -   Getting All the Environment Variables of the Server (http://www.go4expert.com/articles/getting-environment-variables-server-t362/)

naveen 16Jun2005 11:49

Getting All the Environment Variables of the Server
 
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.


All times are GMT +5.5. The time now is 15:44.