in reply to IPC::Open3 and Win32

This is just to comment on the quotes part.

Windows shell interprets single quotes as string delimiters, but double quotes as literals; so that *nix

perl -le 'print "Hello, world!" '
becomes
perl -le "print \"Hello, world!\" "
in windows.

In other words, from the Windows shell, you have to escape double quotes.

Hope that helped that part,
-v
"Perl. There is no substitute."

Replies are listed 'Best First'.
Re^2: IPC::Open3 and Win32
by moseley (Acolyte) on Sep 28, 2004 at 23:46 UTC
    > In other words, from the Windows shell, you have to escape > double quotes.

    I believe that IPC::Open3 is suppose to bypass the windows shell -- IIRC it uses system( 1, @_ ), which I'm not clear on how that works on Win32.

    And I understand about the use of quotes on windows shell -- what's weird is the quotes are not needed to protect spaces in parameters (hint that it's avoiding the shell in that case), but if you use double quote within the parameter then the individual words *are* split into multiple parameters -- as if the shell *is* used in that case.

    The issue here is passing user data from one program to another -- and avoiding the risks of the data passing through the shell.