Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 ( #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
Node Status?
node history
Node Type: note [id://1003157]
help
Chatterbox?
[Corion]: You say the girls may strip with your permission, You draw the line dividing art from sin :-D
[ambrus]: Corion: I didn't want to start this particular computer up, I took this one away so that I can put the other computer I want to start up in its place, but that probably doesn't make much of a difference.

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2017-01-16 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (151 votes). Check out past polls.