perl.exe runs from any folder, and perldoc.bat is not. Meanwhile they both are located in the same folder

254 Views Asked by At

I use ActiveState Perl 5.8.8 with Eclipse/EPIC. And it works fine. I'd like to use perldoc as well. But there is message in Eclipse "Documentation is not available." in Eclipse my perl interpreter is "C:\perl\bin\perlexe". Or if I type in cmd "perldoc" appears a message "Can't find perldoc on PATH." Sure, in system env variables C:\perl\bin path exists. perl.exe and perldoc.bat are located in the same folder, but perl works and perldoc is not. But is I go before to perl folder in cmd "cd C:\perl\bin" and type perldoc, then perldoc works well. I checked my environment variables again, but I couldn't detect any problem there - "C:\perl\bin" is in very beginning of variables in PATH, perl.exe and perldoc.bat are both located in this folder.

1

There are 1 best solutions below

0
On

It's not "perldoc.bat" that couldn't be found. There should be a Perl script named "perldoc" (with no file extension) in the same directory as "perldoc.bat". The message "Can't find %s on PATH" comes from Perl itself and means (see perldiag):

You used the -S switch, but the script to execute could not be found in the PATH.

(It's "perldoc.bat" that runs Perl with the "-S" switch, in order to launch the "perldoc" script.)

I don't know why you were missing the "perldoc" script.