in reply to Re^2: IPC::Run3 error
in thread IPC::Run3 error
Ah, so you are using WinXP, it's just that you have a poorly named tool installed. Let me qualify my earlier post.
Three problems.
You are using options that would be understood by Windows's dir command, which means you're not running Windows's dir command.
The dir command is a builtin shell command. It can only be run from within a shell. Since you're not running a shell since you're using the multiple argument form of system, the right dir will never be found.
You're trying to run a shell command (a pipe). Since you're not running a shell since you're using the multiple argument form of system, that's not going to work.
You broke up the shell command into bits. How is the shell suppose to execute it?
Solution:
$cmd = 'dir /s/b/a-d | p4 -x - add';
which is short for
$cmd = ['cmd', '/c', 'dir /s/b/a-d | p4 -x - add'];
Well, it's suppose to be. The latter doesn't work for some reason.
Update: Removed extraneous quotes that caused the problem identified in the reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: IPC::Run3 error
by Anonymous Monk on Mar 10, 2011 at 08:27 UTC | |
by ikegami (Patriarch) on Mar 10, 2011 at 18:05 UTC | |
|
Re^4: IPC::Run3 error
by freonpsandoz (Beadle) on Mar 08, 2022 at 23:54 UTC | |
by haukex (Archbishop) on Mar 09, 2022 at 05:33 UTC | |
by ikegami (Patriarch) on Mar 09, 2022 at 18:00 UTC | |
by Anonymous Monk on Mar 10, 2022 at 14:16 UTC | |
by ikegami (Patriarch) on Mar 10, 2022 at 21:34 UTC |