in reply to windows vs unix: different behaviour with exec()
the arguments themselves may contain quotes and/or spaces
You could use the list variant of system, in which case the arguments won't undergo shell interpolation.
system("perl", "testexec.pl", "arg 1", '"arg2"');
|
|---|