Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: windows path problem

by toolic (Bishop)
on Aug 19, 2010 at 15:08 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-26 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found