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

So I picked up this book today called Learning Perl and a few of the writers are supposed to of lurked here. I know this is probably a really basic concept, and I will most likely get flamed. I'm just curious as to why when I type in: perldoc -u -f atan2 to my command line I get an error like this:
Microsoft Windows [Version 6.1.7600] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Zach\Documents>perldoc -u -f atan2 Can't spawn "cmd.exe": No such file or directory at C:/strawberry/perl +/lib/Pod/P erldoc.pm line 1681. Can't spawn "cmd.exe": No such file or directory at C:/strawberry/perl +/lib/Pod/P erldoc.pm line 1681. Can't spawn "cmd.exe": No such file or directory at C:/strawberry/perl +/lib/Pod/P erldoc.pm line 1681.

Replies are listed 'Best First'.
Re: perldoc problem
by frozenwithjoy (Priest) on Aug 02, 2012 at 04:00 UTC
    Hi. It looks like someone else has had that problem and it seems to have been because cmd.exe or something else perldoc needs isn't in PATH.
      Well I still get the same error, yet I changed my path to: C:\strawberry\perl\bin;C:\Program Files (x86)\Java\jdk1.7.0_02\bin;
        Well I still get the same error, yet I changed my path to: C:\strawberry\perl\bin;C:\Program Files (x86)\Java\jdk1.7.0_02\bin;

        You will, because when you modified your path, you threw away it original contents, part of which is the path to cmd.exe.

        1. Close your current cmd window.
        2. Open a new one.
        3. Type path %path%c:\strawberry\perl\bin; Enter.
        4. Now try your perldoc command again.

        What you should really do is add (not replace!) perl's path to your system path; then you would haven't to do it each time you start a new session.

        I'm surprised that strawberry perl's installation doesn't do that for you. Or at least tell you how to do it.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

        The start of some sanity?

Re: perldoc problem
by Marshall (Canon) on Aug 02, 2012 at 06:24 UTC
    I am likely to get yelled at, but as a new Perl user, I would recommend using Active State Perl instead of Strawberry.

    The new ActiveState installers work fine.
    I still run Perl 5.10 and "perldoc -u -f atan2" works just fine.
    The new installers will set up the correct paths for you and it will just work.

      Seconded. Active Perl is still just a more complete Windows Product at this point.

      When (if) users find AS Perl limiting them at some point; then consider Strawberry.

      But for its out-of-the-box first experience, AS wins hands down.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

      I am likely to get yelled at, but as a new Perl user, I would recommend using Active State Perl instead of Strawberry.

      YOU CANNOT BEAT A DECADES WORTH OF POLISH (AND OPTIONALLY, PAID SUPPORT ) MARSHALL