in reply to path for perl

You could have set the path in one line:
set path=%windir%\system32;%windir%;%windir%\system32\Wbem;C:\Perl\bin +\
As for Wbem, it's some windoze thing ... as indeed is the requirement for the majority of so many paths

Which is better ? Hmmm, the answer to that depends on whether, as you yourself suggest, you need the environment to be permanent.

BTW, you forgot to include the error you were getting when attempting to run perldoc...

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

Replies are listed 'Best First'.
Re^2: path for perl
by manish.rathi (Acolyte) on Feb 20, 2009 at 01:00 UTC
    Main question is still answered. When "path=C:\perl\bin" is already s +et in the environment variable, why do I get such an error. Why do I +need to set other path as asked in the post Here is the error I get C:\perlfiles>perldoc perldoc Can't spawn "cmd.exe": No such file or directory at C:/Perl/lib/Pod/Pe +rldoc.pm l ine 1515. Can't spawn "cmd.exe": No such file or directory at C:/Perl/lib/Pod/Pe +rldoc.pm l ine 1515. Can't spawn "cmd.exe": No such file or directory at C:/Perl/lib/Pod/Pe +rldoc.pm l ine 1515.

      Just an Off Topic note about readability: <p></p> are for paragraphs (text), <c></c> tags are for code/error reporting. When you surround your whole node in <c></c> tags the paragraph portions become harder to read.

      And you didn't even know bears could type.

      You get that error because the perldoc script uses the 'more' command of the DOS command line shell (cmd.exe) to show you the perldoc. So cmd.exe has to be in the PATH too as well as any other program perldoc might need.

      I don't know much about perl or shells on windows, but you might check if PATH (or path) already has a nice collection of paths before you overwrite it with 'path=...', so you might check that and just add the perl path to it instead of overwriting

      Something's very wrong if cmd.exe isn't in the PATH. It should be in %windir%\system32. Either the PATH in effect isn't what you think it is, or your Windows install is broken.
      Try using the file search in Windoze Explorer (or as I know it, Exploder:-) to search for cmd.exe - having found it, add the directory in which it's located to the path - probably somewhere near the front.

      .oO(It [cmd.exe] might even 'live' in %windir%\system...)

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