3 # $RCSfile: lex.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:04 $
9 print "#1 :$x: eq :x:\n";
10 if ($x eq 'x') {print "ok 1\n";} else {print "not ok 1\n";}
12 $x = $#; # this is the register $#
14 if ($x eq '') {print "ok 2\n";} else {print "not ok 2\n";}
18 if ($x eq '-1') {print "ok 3\n";} else {print "not ok 3\n";}
22 if (length($x) == 1) {print "ok 4\n";} else {print "not ok 4\n";}
27 /^/ && (print "ok 5\n");
31 if (!$@) {print "ok 6\n";} else {print "not ok 6 $@\n";}
33 eval '$foo = 123+123.4+123e4+123.4E5+123.4e+5+.12;';
35 $foo = int($foo * 100 + .5);
36 if ($foo eq 2591024652) {print "ok 7\n";} else {print "not ok 7 :$foo:\n";}
47 eval <<\EOE, print $@;
58 print <<`EOS` . <<\EOF;
77 # previous line intentionally left blank.
84 print "$foo{$bar}" eq "BAZ" ? "ok 19\n" : "not ok 19\n";
86 print "${foo}{$bar}" eq "FOO{BAR}" ? "ok 20\n" : "not ok 20\n";
87 print "${foo{$bar}}" eq "BAZ" ? "ok 21\n" : "not ok 21\n";
89 print "FOO:" =~ /$foo[:]/ ? "ok 22\n" : "not ok 22\n";
90 print "ABC" =~ /^$ary[$A]$/ ? "ok 23\n" : "not ok 23\n";
91 print "FOOZ" =~ /^$foo[$A-Z]$/ ? "ok 24\n" : "not ok 24\n";