http://www.perlmonks.org?node_id=447902


in reply to C:\Documents is not recognised as an internal or external command, program or batchfile.

Hi

This error occurs because CPAN.pm is kicking off a system command of the form:
C:\Documents and Settings\BioGeek\Perl\bin\perl.exe <some arguments>
when DOS wants:
"C:\Documents and Settings\BioGeek\Perl\bin\perl.exe" <some arguments>
If you can provide some more information as to where the error is occurring, by providing more logging info from before the error occurs, maybe we can find which piece of code in CPAN.pm is throwing the error. One possible place is in (Perl 5.8.4, your's may vary)
sub perl { my($self) = @_; my($perl) = File::Spec->file_name_is_absolute($^X) ? $^X : ""; #### JJ Comment - on my machine $^X is "C:\program files\perl\bin\ +perl.exe #### could change this to #### my($perl) = File::Spec->file_name_is_absolute($^X) ? "\"$^X\" +" : ""; my $pwd = CPAN::anycwd(); my $candidate = File::Spec->catfile($pwd,$^X); $perl ||= $candidate if MM->maybe_command($candidate);
Hope this helps, J