The point is, that between where you specify the command string and where Perl is receiving it, something is splitting the command on whitespace--and it's not Perl!
Quick look at the Java docs shows that exec( String command ) uses StringTokenizer to do the splitting. As far as my quick look went it doesn't have a mechanism for escaping spaces, and from your test, it passes escape-quoted strings with the quotes intact. :(
However, just below the form of exec that you are using, the docs describe another form: exec( String[] cmdarray ), which without trying to interpret the (Java) docs, sounds suspiciosly like Perl's list forms of exec and system whereby you pre-tokenize the arguments into the array, and they get passed uninterpreted.
I suggest you pursue that course.
(I don't like Java, but their documentation is both thorough and easy to use! Perl(6) could learn a thing or two there)
In reply to Re^3: ARGV issue.
by BrowserUk
in thread ARGV issue.
by philiotis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |