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 |
In Section
Seekers of Perl Wisdom