manish.rathi has asked for the wisdom of the Perl Monks concerning the following question:

I have setup perl in environment variable PATH. When I execute "C:\perl>perldoc perldoc", I get following error message "C:\Perl>perldoc perldoc Can't spawn "cmd.exe": No such file or directory at C:/Perl/lib/Pod/Perldoc.pm l ine 1515. Can't spawn "cmd.exe": No such file or directory at C:/Perl/lib/Pod/Perldoc.pm l ine 1515. Can't spawn "cmd.exe": No such file or directory at C:/Perl/lib/Pod/Perldoc.pm l ine 1515." Why is it so ? How can I get correct output ?

Replies are listed 'Best First'.
Re: perldoc error
by Anonymous Monk on Feb 17, 2009 at 02:15 UTC
    You did it wrong, and cmd.exe is no longer in your path
    set path=%windir%\system32 set path=%path%;%windir% set path=%path%;%windir%\System32\Wbem set path=%path%;C:\Perl\bin\

      AnonyMonk may well be correct, but it might be well to find out what's actually in your path before tweaking it.

      Typing path from ANY command prompt will tell you.

Re: perldoc error
by Bloodnok (Vicar) on Feb 17, 2009 at 11:18 UTC
    As brother anonymous has suggested, it looks like you have overwritten (c/w appending to) your system path environment variable with your own i.e.
    SET PATH="C:path_to_my_perl"
    instead of ...
    SET PATH=%PATH%;"C:path_to_my_perl"
    By doing so, you remove all the standard paths that Windoze uses to find its detritus - such as, for example, <c>cmd.exe>/c>...

    A user level that continues to overstate my experience :-))