6 print "not ok 1\n" unless 1;
8 print "ok 2\n" unless 0;
9 print "not ok 2\n" if 0;
11 1 && (print "not ok 3\n") if 0;
12 1 && (print "ok 3\n") if 1;
13 0 || (print "not ok 4\n") if 0;
14 0 || (print "ok 4\n") if 1;
17 do {$x[$x] = $x;} while ($x++) < 10;
18 if (join(' ',@x) eq '0 1 2 3 4 5 6 7 8 9 10') {
21 print "not ok 5 @x\n";
25 $x = 10 while $x < 10;
26 if ($x == 15) {print "ok 6\n";} else {print "not ok 6\n";}
28 $y[$_] = $_ * 2 foreach @x;
29 if (join(' ',@y) eq '0 2 4 6 8 10 12 14 16 18 20') {
32 print "not ok 7 @y\n";
35 open(foo,'./TEST') || open(foo,'TEST') || open(foo,'t/TEST');
38 print $x > 50 && $x < 1000 ? "ok 8\n" : "not ok 8\n";
41 print "not " if scalar($x) < 0 and $x >= 0;
44 print "not " unless (-(-$x) < 0) == ($x < 0);
47 print "ok 11\n" if $x < 0;
48 print "not ok 11\n" unless $x < 0;
50 print "ok 12\n" unless $x > 0;
51 print "not ok 12\n" if $x > 0;
53 # This used to cause a segfault
54 $x = "".("".do{"foo" for (1)});