X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlvar.pod;h=f0447cd58fe04cf4bc4e2c44d714c1fc658b1d67;hb=f86702ccfcc3646d7aa30b09ce4f4413be9f99d1;hp=de9bd22348ddad071019a4934e973d41540f3b0f;hpb=b88f04ff2985d0899964b90ae56789d88f6b353e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlvar.pod b/pod/perlvar.pod index de9bd22..f0447cd 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -397,16 +397,26 @@ L. =item $? The status returned by the last pipe close, back-tick (C<``>) command, -or system() operator. Note that this is the status word returned by -the wait() system call, so the exit value of the subprocess is actually -(C<$? EE 8>). Thus on many systems, C<$? & 255> gives which signal, -if any, the process died from, and whether there was a core dump. -(Mnemonic: similar to B and B.) +or system() operator. Note that this is the status word returned by the +wait() system call (or else is made up to look like it -- see L<$^S>). +Thus, the exit value of the subprocess is actually (C<$? EE 8>), +and C<$? & 255> gives which signal, if any, the process died from, and +whether there was a core dump. (Mnemonic: similar to B and B.) Inside an C subroutine C<$?> contains the value that is going to be given to C. You can modify C<$?> in an C subroutine to change the exit status of the script. +=item $SYSTEM_CHILD_STATUS + +=item $^S + +The status returned by the last pipe close, back-tick (C<``>) command, or +system() operator, in the native system format. On UNIX and UNIX-like +systems, C<$^S> is a synonym for C<$?>. Elsewhere, C<$^S> can be used to +determine aspects of child status that are system-specific. Check C<$^O> +before using this variable. (Mnemonic: System-Specific Subprocess Status.) + =item $OS_ERROR =item $ERRNO @@ -426,9 +436,8 @@ operator. (Mnemonic: What just went bang?) =item $^E -More specific information about the last system error than that -provided by C<$!>, if available. (If not, it's just C<$!> again, except under -OS/2.) +More specific information about the last system error than that provided by +C<$!>, if available. (If not, it's just C<$!> again, except under OS/2.) At the moment, this differs from C<$!> under only VMS and OS/2, where it provides the VMS status value from the last system error, and OS/2 error code of the last call to OS/2 API which was not directed via CRT. The @@ -729,7 +738,8 @@ is about to be thrown. The error message is passed as the first argument. When a __DIE__ hook routine returns, the exception processing continues as it would have in the absence of the hook, unless the hook routine itself exits via a C, a loop exit, or a die(). -The __DIE__ handler is explicitly disabled during the call, so that you -can die from a __DIE__ handler. Similarly for __WARN__. +The C<__DIE__> handler is explicitly disabled during the call, so that you +can die from a C<__DIE__> handler. Similarly for C<__WARN__>. See +L, L and L. =back