On Tue, Feb 26, 2019 at 9:45 PM David Cantrell <[email protected]>
wrote:
> On 2019-02-26 17:32, Karen Etheridge wrote:
> > Is there any documentation on that? `perldoc -f system` only describes
> > the different handling of "system LIST" vs "system PROGRAM LIST" on
> > windows, not any differences between different types of quote
> > characters.
>
I'm not sure it's about Windows, as much as it's about cmd.com /
command.com. I've never tried setting $ENV{PERL5SHELL} to specify bash,
even when I had bash for Windows, so I'm guessing ...
> I couldn't see anything in perlport either.
>
> I know that quoting is weird on Windows when the shell gets involved,
> but I thought system(LIST) always avoided that.
>
That at least is documented:
perlfunc:
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.
perlport:
(Win32) "system LIST" without the use of indirect object syntax ("system
PROGRAM LIST") may fall back to trying the shell if the first "spawn()"
fails.
Eirik