in reply to Quotable Quotes

Your problem is not that the quotes get gobbled, it's that you're forgetting that cmd.exe runs whatever you put in backticks on windows.

Double quotes have different meaning in cmd.exe than in most unix shells.

-David

Replies are listed 'Best First'.
Re^2: Quotable Quotes
by b4swine (Pilgrim) on Sep 07, 2007 at 09:21 UTC
    I disagree. That is why I showed the first part of the question, where I wrote "echo hello" with the quotes to a DOS shell. The DOS shell would find this command illegal, yet perl does not.

    Also the second example has two identical commands. One works (without parentheses), one does not (with the (v1) in parens). If we open a DOS shell, they both work. So whatever the difference is, it is on the perl side, not in the command processor.

      Perl is not involved
      C:\>perl -e "print @ARGV" "a r g v" a r g v C:\> C:\>perl -e "print @ARGV" "\"a r g v\"" "a r g v" C:\> C:\>"echo 1" '"echo 1"' is not recognized as an internal or external command, operable program or batch file. C:\> C:\>cmd /C "echo 1" 1 C:\> C:\>cmd /C "\"echo 1\"" '\"echo 1\"' is not recognized as an internal or external command, operable program or batch file. C:\>
        C:\>cmd /C ""echo 1"" '"echo 1"' is not recognized as an internal or external command, operable program or batch file. C:\>
      my $hmm =`perl "My Echo (v1).pl"`; print $hmm;

      works btw ;)