I want the string to be \{ ... '\}' gives me that:
$ perl
$q = '\}';
print "$q\n";
\}
Well I want a combination of variable expanded and not expanded. I
think there will be a general cleanup to some standard quoting for the
RE's as there are hundreds, and about 7 different quote styles right now.
Hmm really? Thats not how gcc seems to parse that, it seems to think
its a comment. Which makes us safe, as the compiler will trip them up.
$ cat test4.c
int main(int argc, char *argv[])
{
int _p = 10;
int *p = &_p;
int foo = 10 /*p;
printf("foo=%d\n", foo);
}
$ cc -o test4 test4.c
test4.c:6:15: error: unterminated comment
test4.c: In function 'main':
test4.c:6: error: expected ',' or ';' at end of input
test4.c:6: error: expected declaration or statement at end of input
Yep and we check for that. But here we are trying to catch a switch and
case at differing levels, we want to catch that whether they got their
spacing right or not.
Well I would tend to say use what works and is easy to understand. The
semantics of '' and "" are well known, to change to qr{} I would have to
go read the manual to know what it is going to do. That said, _if_ it
did have the same semantics as m// then it may wel allow all of these to
be expressed as qr{} as it would expand variables but treat \ as if we
were in ''. So ... to the manual for me.
-apw
-