ActiveState Community

Program keeps accessing wrong version of perl

Posted by bradbueche on 2009-04-10 11:47

If I run my program like this:

perl programName.pl

It works.

If I run
programName.pl

from the commandline it accesses the @INC for another version of perl that I had on the system. I changed the win file assoctiations.....however the win2003 GUI does not actually let you see the command line you are setting up, it only gives you a fricking icon to associate.

Is there a registry setting way to do this? Additionally, I thought I could solve the problem by just making the first line of the program

#!c:\perl\bin\perl.exe

but this does not seem to be getting around the wrong version of perl getting accessed either.

any help is GREATLY appreciated.

brad

grahams | Tue, 2009-07-14 15:52

The way a native Windows version of Perl needs to set up makes it very hard to get two Perls installed side by side. If you don't need the old Perl it's best to uninstall everything and re-install the version you need.

Watch out for environment variables. If you have PERLLIB or PERL5LIB set they will continue to point to the old version and will change what's in your @INC even after a re-install.