How can I set Perl's inclusion path for modules for a CGI script?
I’ve got several Perl modules installed on my hosting machine in ~/perl , how do I add them to Perl module path? Setting PERL5LIB or unshift ing the paths to @INC surely works, but the environment variable does not help when running as a CGI script and the @INC way is not very portable. Is there a better way? This has to be a common problem, am I missing something? brian d foy PERL5LIB works just fine for CGI scripts. You just have to set the variable in the right place, such as the server configuration. Which webserver are you using? For Apache, I use the SetEnv directive from mod_env. @INC