[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Recently Answered %ENV problem



>I remember reading recently that someone was having problems
>with ENV values not be accessable.
[snip]
>I tried the mailing list archive but it does not appear to be
>up-to-date with recent posts and as I recall, it was a fairly
>recent posting.

Matthias addressed this problem on the 31st January as follows:

>From: Matthias Ulrich Neeracher <neeri@iis.ee.ethz.ch>
>Date: Fri, 31 Jan 1997 16:23:13 +0100
>Subject: Re: [MacPerl] Demo.acgi and %ENV

>beck@becktek.com (BeckTek Info)
>>I'm mystified about the %ENV hash used with the CGI Glue for the following
>>reason:
>>If I code:
>>printf ("The number of env variables is %d\n", scalar (keys %ENV));
>>and do a foreach loop to inspect:
>>it only shows at most one variable, a supplied QUERY STRING.
>>However, if I insert debugging code to explicitly examine variables above
>>this loop, like
>>printf ("SERVER SOFTWARE %s\n", $ENV{"SERVER_SOFTWARE"});
>>I get the "correct" output from these printfs AND the foreach loop
>>for whatever variables I explicitly examine. It appears that the act of
>>examining these hash element caused them to spring to life with their
>>correct values.

Matthias:
>This is precisely what happens and is a bug in UN*X perl 5.002. This will
>work correct again in 5.004; I decided aginst fixing it locally.
>Matthias

Alan Fry