Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://947702]
[Lady_Aleena]: Taking the printing functionality out of a module is hard at times. The one I'm currently working on has conditionals and loops for the data to be printed.
[Lady_Aleena]: Some are as easy as returning instead of printing, but only some.
[atcroft]: Lady_Aleena: So you are shoving the disparate data into a structure and returning the structure, so you can run it through a (probably simpler) routine that displays only?

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2017-05-29 02:30 GMT
Find Nodes?
    Voting Booth?