So my guess is that $cmd[0] is inspected for whitespace or quotes, and if it contains either, an intermediate shell is invoked.
That doesn't explain the difference at all. Both 'perl ' and $^X.' ' contain a space.
And there, quoting becomes necessary:
Not at all. You're mixing the single and multi-arg form for system. Quoting is not the bug. (It shouldn't work with quoting either.)
In reply to Re^5: Construct command portable way
by ikegami
in thread Construct command portable way
by avinash_d
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |