summaryrefslogtreecommitdiff
path: root/pod/perlvar.pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod/perlvar.pod')
-rw-r--r--pod/perlvar.pod25
1 files changed, 17 insertions, 8 deletions
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index 248c378614..f0447cd58f 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -397,16 +397,26 @@ L<perlfunc/formline()>.
=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<$? E<gt>E<gt> 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<sh> and B<ksh>.)
+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<$? E<gt>E<gt> 8>),
+and C<$? & 255> gives which signal, if any, the process died from, and
+whether there was a core dump. (Mnemonic: similar to B<sh> and B<ksh>.)
Inside an C<END> subroutine C<$?> contains the value that is going to be
given to C<exit()>. You can modify C<$?> in an C<END> 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