in reply to PERL5LIB with Apache

Check out PassEnv and SetEnv as part of mod_env.

Without PassEnv, environment variables from outside get stripped away. That's why you can't see them.

You can set environment with SetEnv, which seems like the more interesting approach to me for CGI scripts.

Both can be used both in a .htaccess file, or in httpd.conf.