home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / language / perl / Test / T / Base / Cond next >
Encoding:
Text File  |  1989-11-19  |  396 b   |  20 lines

  1. #!./perl
  2.  
  3. # $Header: base.cond,v 3.0 89/10/18 15:24:11 lwall Locked $
  4.  
  5. # make sure conditional operators work
  6.  
  7. print "1..4\n";
  8.  
  9. $x = '0';
  10.  
  11. $x eq $x && (print "ok 1\n");
  12. $x ne $x && (print "not ok 1\n");
  13. $x eq $x || (print "not ok 2\n");
  14. $x ne $x || (print "ok 2\n");
  15.  
  16. $x == $x && (print "ok 3\n");
  17. $x != $x && (print "not ok 3\n");
  18. $x == $x || (print "not ok 4\n");
  19. $x != $x || (print "ok 4\n");
  20.