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

You forgot to escape the HTML of the variables! Maybe you meant:
use CGI qw(header); print header('text/plain'); for (sort keys %ENV) { print "$_ => $ENV{$_}\n"; }

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re: •Re: Re: list of all the $env variables
by eXile (Priest) on May 08, 2004 at 20:23 UTC
    Being really lazy (being a virtue, yada yada), I just cut-and-paste the first env.pl I found googling. I agree doing this text/plain is way better.
      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.

        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' }