Well, with the subprocess_env(), I can see the key that I set in my cgi now, but the value that I set the key to is a Hash reference that I need to use in my cgi. Unfortunately, all I get now is ENV{'TEST_VAR'} = HASH(0x860a278), and I can't pull my values out. Thanks for the help; it looks like we are headed in the right direction. Now, is there any way to set an ENV key to a hash or hash reference and use that later on in a cgi program? Thanks, Gene -----Original Message----- From: darren chamberlain [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 15, 2001 6:19 AM To: modperl Subject: Re: %ENV Gene Dascher ([EMAIL PROTECTED]) said something to this effect on 03/15/2001: > Is the ENV hash sanitized and repopulated between the time the Perl*Auth > handlers are run and the requested cgi is executed? I am setting an ENV key > in one of my handlers that I'd like to use in a cgi that resides in a > protected directory. Is it possible to retain that variable throughout the > entire process, or will it always get wiped out? > > Example: > I use my browser to call a cgi that is in a protected directory. In the > PerlAuthenHandler, I set $ENV{'TEST_VAR'} = 1. I can pull the value of > $ENV{'TEST_VAR'} in the PerlAuthzHandler, but when I try and fetch the value > in the cgi that I called, the key 'TEST_VAR' does not exist. Try fiddling with $r->subprocess_env; I've had good results that way. e.g.: $r->subprocess_env('TEST_VAR', 1); I haven't tried using %ENV, but I was under the impression it was tied to the same internal Apache::Table object as $r->subprocess_env, which means that setting $ENV{'TEST_VAR'} should work as well. Make sure you are setting this in the parent request, if you are in a subrequest: $r = ($r->is_main) ? $r : $r->main; (darren) -- The world is coming to an end! Repent and return those library books!