in reply to Can't spawn "cmd.exe":
Thinking that this might be some weird sort of 32/64 bit issue, ...
I can't reproduce your errors using AS1004 Perl 64-bit running under Vista 64-bit.
#! /usr/bin/perl -slw use strict; print "About to try fail 1"; my $testfile = "test.exe"; my $test = "/C ${testfile} localhost root pwd"; system ("cmd", $test); print "About to try fail 2"; $test = "${testfile} localhost root pwd"; system ($test);
In the following test.exe just displays its args:
c:\test\test\test>test.pl About to try fail 1 0 : test.exe 1 : localhost 2 : root 3 : pwd About to try fail 2 0 : test.exe 1 : localhost 2 : root 3 : pwd
In the first case Perl starts cmd.exe, which runs test.exe. In the second, perl runs test.exe directly. No error messages are produced by either.
What version/build of Perl are you using?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can't spawn "cmd.exe":
by emalossi (Novice) on Mar 18, 2009 at 14:33 UTC | |
by BrowserUk (Patriarch) on Mar 18, 2009 at 16:45 UTC | |
by ikegami (Patriarch) on Mar 18, 2009 at 17:21 UTC | |
by BrowserUk (Patriarch) on Mar 18, 2009 at 23:11 UTC | |
by ikegami (Patriarch) on Mar 19, 2009 at 04:00 UTC | |
|