xref: /openbsd/gnu/usr.bin/perl/t/base/cond.t (revision 404b540a)
1#!./perl
2
3# make sure conditional operators work
4
5print "1..4\n";
6
7$x = '0';
8
9$x eq $x && (print "ok 1\n");
10$x ne $x && (print "not ok 1\n");
11$x eq $x || (print "not ok 2\n");
12$x ne $x || (print "ok 2\n");
13
14$x == $x && (print "ok 3\n");
15$x != $x && (print "not ok 3\n");
16$x == $x || (print "not ok 4\n");
17$x != $x || (print "ok 4\n");
18