AFAIK it isn't as easy for Perl to avoid the shell on Windows, and the system docs do say "On Windows, only the system PROGRAM LIST syntax will reliably avoid using the shell; system LIST, even with more than one element, will fall back to the shell if the first spawn fails." So you might want to try system {$^X} $^X, ...;. Otherwise, there is Win32::ShellQuote, and I wrote an article about various other methods for running system commands, some of which also help you avoid the shell, here. In particular, newer versions of IPC::Run3 will automatically use Win32::ShellQuote on Windows.
In reply to Re: Having to manually escape quote character in args to "system"?
by haukex
in thread Having to manually escape quote character in args to "system"?
by vr
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |