in reply to Re: Re: system call not working
in thread system call not working
But the "or die" part is wrong: system() will return the exit status of the process, which is based on shell semantics: a return value of zero means "success" (i.e. "good") whereas any non-zero value means "failure" (i.e. "bad") -- so you probably want to say "and die" instead.You are wrong, the example is fine.
die is only called, if the returncode from system is not 0. This is exactly what we want it to do.system('procheck', $pdbfile, '1.0') == 0 or die "system failed ( $? )" +;
|
|---|