in reply to Re: script fails loading module version, but > version is installed
in thread script fails loading module version, but > version is installed

You're not using the same perl

I put this at the top of the script being run:
print "PERL VERSION : "; print `perl -v`; print "\n"; __END__
it prints this:
PERL VERSION : This is perl, v5.8.8 built for darwin-2level blah blah...
- same as the version I am running with -e on the command line...

I don't know what other perl I could be running.

Replies are listed 'Best First'.
Re^3: script fails loading module version, but > version is installed
by Corion (Patriarch) on Jun 30, 2011 at 06:08 UTC

    Output %INC resp. $INC{"CGI.pm"} in the good and the bad case to see which file gets loaded from where.

      yes, thanks. Two different places.

      so why is the script pointing to a different location than perl -e?

      And how do I change that?

Re^3: script fails loading module version, but > version is installed
by Anonymous Monk on Jun 30, 2011 at 06:09 UTC

    I don't know what other perl I could be running.

    You're not checking to see which perl you're running

    $ perl -e " die $^X" C:\perl\5.12.2\bin\MSWin32-x86-multi-thread\perl.exe at -e line 1.

    Similarly compare %ENV, INC, %INC

    Some have installed 85+ different perls