J
Jamie Ruff
I am having problems with making system calls on Windows under Cygwin
that involve the use of redirection operators and pipes. For example,
the line below will cat two files, but the next command will not
append the first file to the end of the second as expected and issues
the error "Can't spawn "cmd.exe": No such file or directory at line
x". If I issue the append command manually on the command line, then
it works fine.
system("cat file1 file2"); # works fine
system("cat file1 >> file2"); # where is cmd.exe?
Since the first command works, I assume that the path to 'cmd.exe' is
set correctly within the program as system always uses cmd.exe to run
commands.
If I use ``'s, then I do not get the error, but the command still does
not execute.
One possible explanation, is that since I am using Cygwin on Windows
to allow the script to run UNIX style commands, Perl may be having
problems with that. The question being how do I test for this?
that involve the use of redirection operators and pipes. For example,
the line below will cat two files, but the next command will not
append the first file to the end of the second as expected and issues
the error "Can't spawn "cmd.exe": No such file or directory at line
x". If I issue the append command manually on the command line, then
it works fine.
system("cat file1 file2"); # works fine
system("cat file1 >> file2"); # where is cmd.exe?
Since the first command works, I assume that the path to 'cmd.exe' is
set correctly within the program as system always uses cmd.exe to run
commands.
If I use ``'s, then I do not get the error, but the command still does
not execute.
One possible explanation, is that since I am using Cygwin on Windows
to allow the script to run UNIX style commands, Perl may be having
problems with that. The question being how do I test for this?