Two things...

Chris Zampese wrote:
Hi everyon, thanks for your help so far....

I am trying to substitute a path for another path.
I have html documents which refer to some images in the following directory:
C:\Documents and Settings\chrisz\Desktop\Web_notes\PFLogo.gif

I would like to change this so it reads:

.../PFLogo.gif

I have tried the following substitution:

$rplcthis = "C:\\Documents and Settings\\chrisz\\Desktop\\Web_notes";
Here you can use single quotes instead of doubles, and you should not need to escape the backslashes, after switching to singles. If you insist on using doubles, try \\\\ which is just as good a reason not to....

$with = "..";
$line =~ s/$rplcthis/$with/g;

But it does not seem to work. Through testing, I think that it is the '\' character that it does not like in the regex?

If you are unhappy with the service of the '/' character try a different brand ;-), aka the separator character can be just about anything try '|' on for size, some people feel it is a better fit.

http://danconia.org


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to