well, I get the error if using cmd /c but not calling the batch file directly
don't use cmd /c and it will work
Thanks a lot! I could verify that, what you said, is true (though it only helps partially here, because in our application, we receive the commands to be executed from an outside source, and we can't control how they are created - but this is a different matter).
However, I don't feel that the explanation> you provided, is really correct to explain the case, for the following reason:
A batch file can't be run "by itself" - it always needs a CMD.EXE (or a compatible command interpreter) to run it; so, even if I pass the batchfile name directly, Perl (or Windows?) must, under the hood, spawn cmd.exe somewhere, in order to execute the batch file. Thus I don't think it has to do with whether or not CMD is used (it always is), but somewhat in the way system is implemented, manages to add the incorrect double quote in certain cases...
Ronald Fischer <firstname.lastname@example.org>