Aha!

No gratuitous perl alternatives list is complete without map!

map {print "$_: $ENV{$_}<br>\n"} keys %ENV;

Hee hee :)
- Matt


Aaron Craig wrote:
> 
> At 12:13 07.06.2001 -0400, you wrote:
> >Progress!! now I understand what the 'QUERY_STRING' is!
> >
> >and a little
> >
> >foreach(@key = keys(%ENV))
> >{
> >         print "$_: $ENV{$_}<br>\n";
> >}
> except you should write
> 
> foreach(keys %ENV)
>          {
>          print ...
>          }
> 
> or
> foreach my $key (keys %ENV)
>          {
>          print "$key: $ENV{$key}<br>";
>          }
> 
> or, my favorite
> 
> print "$_ => $ENV{$_}<br>\n" foreach keys %ENV;
> 
> Aaron Craig
> Programming
> iSoftitler.com

Reply via email to