Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: windows path problem

by toolic (Bishop)
on Aug 19, 2010 at 15:08 UTC ( #856053=note: print w/replies, xml ) Need Help??


in reply to windows path problem

Neither did you show actual Perl code, nor did you describe how it did not work for you. This will perform the substitution you requested:
use strict; use warnings; my $path = 'c:\abc\xyz'; $path =~ s/\\/\\\\/g; print $path; __END__ c:\\abc\\xyz

The double quotes interpolate. If you use strict and warnings, you will get a warning message.

On a side note, when posting, just include code within code tags, not all of your text.

Replies are listed 'Best First'.
Re^2: windows path problem
by anu_1 (Acolyte) on Aug 20, 2010 at 03:53 UTC
    Thanks for solving the problem.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2022-01-28 16:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (73 votes). Check out past polls.

    Notices?