in reply to Re: Executing / Retrieving Output from Command
in thread Executing / Retrieving Output from Command

Perl automatically tries cmd /c $command is executing $command fails (or something like that), so `dir` actually does work on Windows.

I consider that a bug since it harms error reporting.

>perl -e"print `dir /b`" bar foo Windows: >perl -le"`nonexistant`; print $?; print $! if $?==-1" 'nonexistant' is not recognized as an internal or external command, operable program or batch file. 256 unix: $ perl -le'`nonexistant`; print $?; print $! if $?==-1' -1 No such file or directory