From: Gurusamy Sarathy Date: Sun, 28 Feb 1999 22:46:24 +0000 (+0000) Subject: avoid literal control characters in change#3039 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=765cb2dcaca2a5ce636f8cb6ca3956455d285e9e;p=p5sagit%2Fp5-mst-13.2.git avoid literal control characters in change#3039 p4raw-link: @3039 on //depot/perl: 2b92dfceaa9d709661beb0761c3c790732df0cbc p4raw-id: //depot/perl@3040 --- diff --git a/t/base/lex.t b/t/base/lex.t index 325fd42..6bb39d0 100755 --- a/t/base/lex.t +++ b/t/base/lex.t @@ -129,11 +129,11 @@ print $foo; print "ok 31\n"; # Does the syntax where we use the literal control character still work? - if ($ {} != 17) { print "not " } + if (eval "\$ {\cX}" != 17 or $@) { print "not " } print "ok 32\n"; - $ = 24; # Literal control character - if ($ != 24) { print "not " } # Literal control character + eval "\$\cN = 24"; # Literal control character + if ($@ or ${"\cN"} != 24) { print "not " } print "ok 33\n"; if ($^N != 24) { print "not " } # Control character escape sequence print "ok 34\n";