Problems? Is your data what you think it is? | |
PerlMonks |
Re^2: IPC::Run3 errorby chrestomanci (Priest) |
on Mar 10, 2011 at 13:40 UTC ( [id://892412]=note: print w/replies, xml ) | Need Help?? |
Point of clarification: I think the OP probably does not know that if you pass a scalar to system (or exec) then the shell is involved, but if you pass an array, then the shell get's bypassed, and the named command is run directly. eg, This will pass the entire command string to the shell, which will in turn invoke find, and setup a pipe to send the output to p4. system('find -type f | p4 -x - add')You might try this, but it would not work, as the find command would receive all the other arguments, and would not know how to process anything after the pipe character. system('find', '-type', 'f', '|', 'p4', '-x', '-', 'add')Back to the OP's question. Under windows, the DIR command is a shell built in, so in order to invoke it, you must invoke the shell. There is not DIR.exe system file that could be invoked outside the shell.
In Section
Seekers of Perl Wisdom
|
|