home *** CD-ROM | disk | FTP | other *** search
/ Borland Programmer's Resource / Borland_Programmers_Resource_CD_1995.iso / ntcode / ntperlb / t / op / exec.nt < prev    next >
Encoding:
Text File  |  1995-05-19  |  487 b   |  17 lines

  1. #!./perl
  2.  
  3. # $Header: exec.t,v 4.0 91/03/20 01:52:25 lwall Locked $
  4.  
  5. $| = 1;                # flush stdout
  6. print "1..5\n";
  7.  
  8. print "not ok 2\n" if system "echo ok 1";    # split and directly called
  9.  
  10. print "not ok 3\n" if system "cmd.exe", "/c", "echo", "ok", "2"; # directly called
  11.  
  12. if ((system "lskdfj >nul: 2>&1") == 1) {print "ok 3\n";} else {print "not ok 3\n";}
  13.  
  14. unless (exec "lskdsalksdjfdjfkls") {print "ok 4\n";} else {print "not ok 4\n";}
  15.  
  16. exec "cmd.exe", "/c", "echo","ok","5";
  17.