Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: System, exec different behaviour with spaces

by ikegami (Pope)
on Jan 13, 2012 at 07:09 UTC ( #947702=note: print w/ replies, xml ) Need Help??


in reply to System, exec different behaviour with spaces

You can work around this weirdness by using the following:

perl -e"$prog = 'C:\Program Files\Java\jdk1.6.0_15\bin\java.exe'; exec + { $prog } 'java', '-version'"

It doesn't work if you use the full path after the curlies.


Comment on Re: System, exec different behaviour with spaces
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2014-11-26 11:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (167 votes), past polls