in reply to Re^3: Multiple Instances
in thread Multiple Instances

That doesn't address the issue. Let me rephrase it slightly: suppose the application requires multiple arguments, some of which need to be double quoted. How then do you manage the quoting? For example, if the application is 'copy' how would you perform the equivalent of:

copy "this one.txt" "that one.txt"

True laziness is hard work

Replies are listed 'Best First'.
Re^5: Multiple Instances
by VinsWorldcom (Prior) on Mar 12, 2009 at 12:33 UTC

    I wouldn't. You've got me there, my example would not work. I read the original question as there would be only 1 argument passed to each instance of the JAMES.EXE that was launched. Thus, my intention was to be able to send a single argument to JAMES.EXE - even if that argument happened to be a filename and happened to contain spaces.

    It could be done, but you'd need more detailed parsing of the Perl script's input arguments. The original question provided ~ 1 arg1 2 arg2 3 arg3 ~ where # was the instance and arg# was the single argument to each instance. If there were going to be multiple arguments, you could parse the ARGV looking for 1, then 2, then 3 and after each instance is found, launch into a loop that gathers all arguments until the next number in line is found. That would handle ~ 1 arg1 arg1' 2 arg2 3 arg3 arg3' arg3'' ~