On Oct 19, Steve Bertrand said: >>> $line =~ s/images\//\.\.\/\.\.\/images/g; >> >> Leaning toothpicks! You don't need to escape the '.' on the >> replacement >> string side because they are literal '.' characters there. Changing >> the >> delimiter to something other than '/' will eliminate the need to >> escape >> the '/' characters as well. > >Yes, as I saw in your post. As you say though, if one does not need to >escape the '.'s on the replacement side, because they are literal, >should the '\' not be literal as well?
The right-hand side is a double-quoted string. "." isn't special in a double-quoted string, but "\" is. -- Jeff "japhy" Pinyan % How can we ever be the sold short or RPI Acacia Brother #734 % the cheated, we who for every service http://japhy.perlmonk.org/ % have long ago been overpaid? http://www.perlmonks.org/ % -- Meister Eckhart -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>