freedman@rjf001.uucp (Richard J. Freedman) (03/26/91)
When I run the following program with perl4 #!./perl $| = 1; # flush stdout if (system "/bin/sh -c true") {print "not ok \n";} else {print "ok 3\n";} if (system "/bin/csh -c true") {print "not ok \n";} else {print "ok 4\n";} if (system "true") {print "not ok 5\n";} else {print "ok 5\n";} if (system "false") {print "not ok 6\n";} else {print "ok 6\n";} if (0) {print "not ok 7\n";} else {print "ok 7\n";} if (1) {print "not ok 8\n";} else {print "ok 8\n";} I get the following: ok 3 ok 4 not ok 5 not ok 6 ok 7 not ok 8 Clearly, the "not ok 5", is not ok. Does anyone have a suggestion as to what is amiss? When I run perl3.44 I get the correct result. Thanks, Dick
gemini@geminix.in-berlin.de (Uwe Doering) (03/26/91)
freedman@rjf001.uucp (Richard J. Freedman) writes: >When I run the following program with perl4 > > [stuff deleted] > >if (system "true") {print "not ok 5\n";} else {print "ok 5\n";} > > [stuff deleted] > >I get the following: > >ok 3 >ok 4 >not ok 5 >not ok 6 >ok 7 >not ok 8 > >Clearly, the "not ok 5", is not ok. > >Does anyone have a suggestion as to what is amiss? When I run perl3.44 >I get the correct result. This works for me. That is, I get `ok 5' on my SysVr3.2 system. Are you sure that there is a `true' program in one of the directories that are in your PATH environment variable? I found out that on some SysVr3.x systems the `true' program (actually, it's a shell script that returns an exit status of `0') is simply missing, and therefore, perl can't find it and reports `not ok 5'. If it worked unter perl 3.44, are you sure that nothing on your system that could cause this problem has changed in the mean time? Uwe -- Uwe Doering | INET : gemini@geminix.in-berlin.de Berlin |---------------------------------------------------------------- Germany | UUCP : ...!unido!fub!geminix.in-berlin.de!gemini