in reply to doublequoted commands inside backticks on windows, perl 5.6

c:\path\cleartool\ is a directory, not a program.
  • Comment on Re: doublequoted commands inside backticks on windows, perl 5.6

Replies are listed 'Best First'.
Re^2: doublequoted commands inside backticks on windows, perl 5.6
by emgrasso (Novice) on Oct 28, 2004 at 18:40 UTC
    No, it is not a directory you are misreading the \" at the end of the command name:
    "c:\path\cleartool" -fmt "%[owner]p" vob:. #outside perl
    \"c:\\path\\cleartool\" -fmt \"%[owner]p\" vob:. #inside perl
    The problem is that something is eating the first quote at the beginning of the line and the second quote in the parameter section, instead of either eating matching quotes or leaving them alone.
Re^2: doublequoted commands inside backticks on windows, perl 5.6
by ikegami (Patriarch) on Oct 28, 2004 at 17:26 UTC
    Then why does c:\path\cleartool -fmt "%[owner]p" vob:. work? Presumably, path is something like Program Files\cleartool

      Did you not notice that c:\path\cleartool works and c:\path\cleartool\ not? That's the difference - one ends with a backslash and the other does not. File names the end in slashes are always interpreted as directories.

        hum? none of them ends with a backslash. Look again and you'll notice the slash escapes the ", and is removed by perl. The error message isn't consistent with the code provided, though.