On Thu, 31 Aug 2000, erich oliphant wrote:

> Hi,
> I am porting a shell script CGI to mod_perl.  It uses a great many 
> environment variables.  I'm new to the project so figuring out which 
> variables to pass is rather tedious.  Does PassEnv support wildcards 
> (PassEnv *) or some option to pass the entire parent environment?

the Perl %ENV is cleared during startup, but the C environment is left in
tact.  with a combo of forking `env` and <Perl> sections you can do this.
for example, this passes all environment variables that begin with the
letter H:

<Perl>
local $ENV{PATH} = '/usr/bin';
local $_;

for (`env`) {
    next unless /^(H.*)=/;
    push @PassEnv, $1;
}
</Perl>

Reply via email to