From: Gurusamy Sarathy Date: Fri, 28 Apr 2000 08:27:12 +0000 (+0000) Subject: qw(a\\b) must be parsed like 'a\\b', i.e., backslash escapes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3201ebbdcb10569bd1977f3cabf046969e76aa5d;p=p5sagit%2Fp5-mst-13.2.git qw(a\\b) must be parsed like 'a\\b', i.e., backslash escapes itself and no other (from Tom Hughes) p4raw-id: //depot/perl@5989 --- diff --git a/t/op/array.t b/t/op/array.t index 1108f49..97a4a40 100755 --- a/t/op/array.t +++ b/t/op/array.t @@ -139,8 +139,8 @@ t("@foo" eq "bar burbl blah"); # 39 @foo = ('XXX',@foo, 'YYY'); t("@foo" eq "XXX bar burbl blah YYY"); # 40 -@foo = @foo = qw(foo bar burbl blah); -t("@foo" eq "foo bar burbl blah"); # 41 +@foo = @foo = qw(foo b\a\r bu\\rbl blah); +t("@foo" eq 'foo b\a\r bu\\rbl blah'); # 41 @bar = @foo = qw(foo bar); # 42 t("@foo" eq "foo bar"); diff --git a/toke.c b/toke.c index 7d4e937..5c1b945 100644 --- a/toke.c +++ b/toke.c @@ -4504,7 +4504,7 @@ Perl_yylex(pTHX) for (; !isSPACE(*d) && len; --len, ++d) ; } words = append_elem(OP_LIST, words, - newSVOP(OP_CONST, 0, newSVpvn(b, d-b))); + newSVOP(OP_CONST, 0, tokeq(newSVpvn(b, d-b)))); } } if (words) {