Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: Calling Windows Batch from Perl, double-quote appearing out of nowhere

by rovf (Priest)
on Nov 09, 2012 at 15:17 UTC ( [id://1003157]=note: print w/replies, xml ) Need Help??


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 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 <ynnor@mm.st>
  • Comment on Re^2: Calling Windows Batch from Perl, double-quote appearing out of nowhere
  • Download Code

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
    I can't tell, are you asking me something?
      are you asking me something?

      No, not asking, just a comment to your (helpful) response. BTW, I think that the posting given by tye explains the behavour I am seeing.

      -- 
      Ronald Fischer <ynnor@mm.st>

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1003157]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-20 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found