Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: windows path problem

by ikegami (Patriarch)
on Aug 19, 2010 at 15:34 UTC ( [id://856066]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://856066]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-19 20:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found