http://qs321.pair.com?node_id=856066


in reply to windows path problem

I'm not sure why you'd need to do that. Normally, you need to double the slashes in a string literal so it produces a string with single backslashes.

>perl -le"print qq{c:\\abc\\xyz};" c:\abc\xyz

You do not want to pass doubled slashes to open.

Replies are listed 'Best First'.
Re^2: windows path problem
by TomDLux (Vicar) on Aug 19, 2010 at 19:44 UTC
    But you might want double quotes if you're going to be using the shell, as in
    system( "dir $path" );
    rather than bypassing the shell
    system( 'dir', $path )';
    Disclaimer: I'm a Unix guy. This would be true on Unix; does "MS-DOS 2010" still have a shell?

    --
    TTTATCGGTCGTTATATAGATGTTTGCA

      No, you wouldn't. "\" is not special to the cmd shell, and it doesn't use "\" for escaping.