![]() |
|
Syntactic Confectionery Delight | |
PerlMonks |
IPC::Run on WindowsXP/Windows Server 2003?by DrWhy (Chaplain) |
on Jun 07, 2008 at 02:03 UTC ( [id://690790]=perlquestion: print w/replies, xml ) | Need Help?? |
DrWhy has asked for the wisdom of the Perl Monks concerning the following question:
I'm using IPC::Run as the basis for module that overrides system() allowing you to capture output from system() calls in modules you use. It seems to be working fine on Linux, and on Windows XP/Server 2003 it works for the system(@args) form of system. However, for system($mycommandandargsinonescalar) it will not work. It seems the problem is that when an IPC::Run harness is created with just a single scalar containing a whole command line, it splits up the command into an array of command and arguments and then prepends 'command', '/c' to this list. It appears it's trying to generate a windows shell oneliner. but on all of the XP and Server 2003 machines I have there is no shell named 'command', it's 'cmd', so when you try to run the harness thus created it fails, since there is no command 'command'.
I'd appreciate any insight into what's going on here. Did older windows OS's have a command shell named 'command'? Does anyone know of a good workaround to this problem? Thanks, --DrWhy "If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."
Back to
Seekers of Perl Wisdom
|
|