in reply to Re: Calling Windows Batch from Perl, double-quote appearing out of nowhere
in thread Calling Windows Batch from Perl, double-quote appearing out of nowhere
well, I get the error if using cmd /c but not calling the batch file directly don't use cmd /c and it will workThanks 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...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Calling Windows Batch from Perl, double-quote appearing out of nowhere
by Anonymous Monk on Nov 09, 2012 at 15:26 UTC | |
by rovf (Priest) on Nov 09, 2012 at 15:29 UTC |