I am trying to use <Perl> sections in my Apache conf files, in order to automate management of my various installations on various servers.
Looking at this page: http://perl.apache.org/docs/2.0/api/Apache2/PerlSections.html#Configuration_Variables I gather that any directive that can be written in an Apache conf file, can also be written as a perl statement in a <Perl> section of the Apache conf file. As I understand it, you do this by pushing the directives arguments to an array whose name is the same as the directive. For example, if I want to write a Perl statement which does the equivalent of this: --- SetEnv HELLO_WORLD "Salutation earthlings" --- I would write this: --- <Perl> push @SetEnv, "HELLO_WORLD", "Salutation earthlings"; </Perl> --- Is that correct? I have tried this, but it does not seem to work. The reason I say this is that if I run a script that prints the environment: --- print_env.cgi: print "Content-type: text/plain\r\n\r\n"; print "Environment variables are:\n"; foreach my $a_key ( keys %ENV ) { print "$a_key:\t$ENV{$a_key}\n"; } --- end of print_env.cgi I do see a HELLO_WORLD variable, but it's empty. I also see a Salutation variable (also empty), which I guess is what Apache did with the first word the value which I intended for HELLO_WORLD. There is no "earthlings" variable. What am I doing wrong?