I have 2 installed Perl on the OS, now my cgi script need to run the module on newly installed Perl, I've already set played the PERL5LIB, @INC to include the new instance but it doesn't work.

Any way to modify apache to look/use the new Perl instance?


Can you start your cgi script with a she-bang, using the path of your desired perl:

#!/usr/bin/perl -w
  • Adding the desired perl on header as you suggested works. – user114082 Mar 14 '12 at 19:23
  • @lupin -- thanks. If you are satisfied with the solution, could you mark my answer as accepted? – Lars Rohrbach Mar 14 '12 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.