Help for this page

Select Code to Download


  1. or download this
    # Turns numerical return codes into text.  See perlvar.
    sub get_system_error {
    ...
      local $! = $code;
      return "$!";
    }
    
  2. or download this
    if (0 < $?) {
      my $sys_msg = get_system_error($?);
      die "'$cmd' failed. ret code $?.  (Guess: '$sys_msg'?)";
    }