in reply to Re^2: IPC::Run on Windows, path separator
in thread IPC::Run on Windows, path separator

system calls the shell when it's documented not to in Windows. According to the documentation, perl -e"system('dir')" and perl -e"system('foo.bat')" should fail, yet both work. This might be documented in perlport.

Replies are listed 'Best First'.
Re^4: IPC::Run on Windows, path separator
by BrowserUk (Patriarch) on May 27, 2010 at 15:12 UTC

    Please call for the documentation to change, not the implementation. It's a few little details like this that make perl usable on windows.

      Whatever we think of it, we're stuck with it because of backwards compatibility reasons. Note that

      system { $cmd[0] } @cmd;

      appears to work as documented, except for the error code.

        Hm. I'd never seen that syntax. I know exec doesn't make sense on my OS, so I've never looked at that part of the docs. There's always something new to learn, even if it is non-useful :)


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
Re^4: IPC::Run on Windows, path separator
by rovf (Priest) on May 27, 2010 at 15:28 UTC
    Indeed! OTOH, IPC::Run::run(['echo xxx']) fails....

    -- 
    Ronald Fischer <ynnor@mm.st>