Actually, Perl doesn't reinterpolate strings. Two backslashes should be enough. This sounds like a bug.
As an example, if I do: $str= "C:\\Windows" and then try to use $str in a regular expression: if( $path =~ /^$str/i ) { then this won't work. But that is because I made a mistake. I should have written: if( $path =~ /^\Q$str\E/i ) { to tell the regular expression that I wanted it to parse $str as a string and not as a regular expression. (I also made a mistake in trying to use a regular expression to compare file paths as the resulting code is not portable.)
I have a hard time coming up with cases other than regular expressions and eval where it is easy to get Perl to interpolate a string a second time. Perhaps you could do some more digging and find where this second interpolation is happening so that a fix could be made (or so I could understand why it isn't a bug in this case).
- tye (but my friends call me "Tye")In reply to (tye)Re: I think I'm starting to get it
by tye
in thread I think I'm starting to get it
by coolmichael
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |