On Friday 14 December 2007 19:01, jeff pang wrote: > > --- "John W.Krahn" <[EMAIL PROTECTED]> wrote: > > > > No, you would have to do: > > > > if ( !system($touchcmd) && !system($chkstat) ) > > I have thought that, if the unix command's author doesn't return a 0 > from the code, how will we get the result of a system command was > executed successfully or not? > > ie, maybe the ppl can return 1 or any other value except 0 from the > code:
And another point, perhaps the main point, is that a program could have many different reasons for failure. With 0 for success and any non-zero value for failure you can specify exactly why the program failed by returning any positive integer for each failure reason. If you inverse that then you could only have ONE reason to fail and MANY different reasons for success. Do you really want that? Think about it. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/