Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: •Re: Re: list of all the $env variables

by defyance (Curate)
on May 08, 2004 at 21:34 UTC ( #351768=note: print w/ replies, xml ) Need Help??


in reply to Re: •Re: Re: list of all the $env variables
in thread list of all the $env variables

Kind of OT, but you could even use map, it's fun stuff.

#!/usr/bin/perl -w use CGI qw(header); print header('text/plain'); print map { "$_ => $ENV{$_}\n" } sort keys %ENV;

--
A conclusion is simply the place where someone got tired of thinking.


Comment on Re: Re: •Re: Re: list of all the $env variables
Download Code
Re: Re: Re: •Re: Re: list of all the $env variables
by Juerd (Abbot) on May 08, 2004 at 22:33 UTC

    Kind of OT, but you could even use map, it's fun stuff.

    What happened to good old laziness?

    #!/usr/bin/perl use Data::Dumper; print $/, Dumper \%ENV;

    Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

      Or from the command line:

      perl -MData::Dumper -e 'print Dumper \%ENV'
      That should do the trick. (Adjust quotes to taste.)


      Dave

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://351768]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (14)
As of 2015-07-02 08:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (31 votes), past polls