On Thu, Sep 16, 2010 at 1:20 AM, Pete Ford <p...@justcroft.com> wrote:

> On 15/09/10 18:00, David Harkness wrote:
>> $v = $row->xpath("//membernumber[. = \"$MemberId\"]");
> Oooh, I hate using backslashes - they always seem so untidy...
> I have a pathological fear of sed scripts, too. :(

And yet I find them the *most* tidy in a way: \" inserts an actual
double-quote into the string. I don't think that's any more magical than
"surround it with single-quotes so it doesn't terminate the string." It will
work in single- and double-quoted strings equally, so you don't have to
worry about switching from one to the other messing up the expression.


Reply via email to