Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi

I have installed Perl on Windows OS more times than I have hairs on my head! however....

I have downloaded active perl v 5.8.8 for WinXP from active estat.com. I installed it without any problems. Then I test the installation with this code
#! c:/perl/bin/perl.exe -slw use strict; print "\nHello World \n"; what I got back when I ran the script was: C:\Perl>test.pl Can't locate strict.pm in @INC (@INC contains: .) at C:\Perl\test.pl l +ine 2. BEGIN failed--compilation aborted at C:\Perl\test.pl line 2.
I tried uninstalling and reinstalling to no avail. How can I get perl to point @INC to the normal places @INC points at.

Thanks

Replies are listed 'Best First'.
Re: trouble shooting perl installation
by ww (Archbishop) on Mar 15, 2007 at 14:47 UTC
    Your OP raises -- for me; YMMV -- two questions:
    • Did you accept defaults on the install? (.oO: if not, could this be an issue?)
    • Why do you have test.pl in C:\perl? I ask because that seems to me that, in general, storing scripts there could (for lack of a better word) "pollute" your directory.
      Thanks for your reply

      1- Yes I have accepted the defaults on installation (such as association of .pl files and setting the path ..etc)

      2- Thanks for your advise I will move the scripts directory from c:\perl to c:\scripts.

      As I said I have installed Perl on Win OS more times than I had hot dinners but never came across this problem before!
        In effect, this is an update to the grandparent node, after returning from the fire call which interrupted my reply:

        Have you searched your disk for strict.pm to see if (a) it's installed somewhere odd or (b) is missing entirely?

        When installing the latest version, did you replace or retain the older one? If so, could you have a registry problem?

        And, you may find value in chromatic's Re: @INC or the replies to How to Add path to @INC or perhaps even the faq, How do I add a directory to my include path at runtime? (which offers as its last possibility, what amounts to a workaround. You may also be able to find other related items in Search (in the Perl Monks bar) atop the page.

        And, of course, check ActiveState's site to see if others have noted a similar problem or offered an answer.

Re: trouble shooting perl installation
by wfsp (Abbot) on Mar 15, 2007 at 16:54 UTC
    Are you installing over an existing version? This has caused me some grief in the past, particularly going from 5.8.7 to 5.8.8.

    The best bet is to use the windows "Add or Remove programs" to uninstall it and to then delete any remaining dirs (in spite of what the activestate docs say).

    Then do a fresh install. Doing it that way everything went swimmingly. hth