Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This is the code I'm using but its not returning a value for content length.
#/perl/bin/perl.exe -w use strict; my %env_info=( REMOTE_ADDR => "http://www.google.com", CONTENT_LENGTH => " " ); my $name; foreach $name (keys %ENV) { $env_info{$name} = "info provided by the server" unless exists $env_info{$name}; } foreach $name (sort keys %env_info) { my $info = $env_info{$name}; my $value = $ENV{$name} || print "Not defined\n"; print "$name INFO: $info VALUE: $value\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Content Length
by gjb (Vicar) on Nov 11, 2002 at 14:28 UTC | |
by Anonymous Monk on Nov 11, 2002 at 14:32 UTC | |
by FamousLongAgo (Friar) on Nov 11, 2002 at 14:47 UTC | |
|
Re: Content Length
by fglock (Vicar) on Nov 11, 2002 at 14:48 UTC | |
|
Re: Content Length
by LTjake (Prior) on Nov 11, 2002 at 14:48 UTC | |
|
Re: Content Length
by Jaap (Curate) on Nov 11, 2002 at 14:52 UTC | |
|
Re: Content Length
by ajt (Prior) on Nov 11, 2002 at 14:47 UTC | |
|
Re: Content Length
by pg (Canon) on Nov 11, 2002 at 16:37 UTC |