Help for this page

Select Code to Download


  1. or download this
        my $exit1 = system "program1";
        if ($exit1 == -1) {
    ...
        }
        $exit1 >>= 8;   # Get the real-exit value. The bits we
                       # are shifting off are any possible signals.
    
  2. or download this
        my $exit2 = system "program2", $exit1;
        if ($exit2 == -1) {
            die "Failed to call 'program2': $!\n";
        }