develooper Front page | perl.perl5.porters | Postings from December 2001

[DOC PATCH] left is right and right is left

Thread Next
From:
Philip Newton
Date:
December 27, 2001 01:00
Subject:
[DOC PATCH] left is right and right is left
Message ID:
vsol2uchfg3ruf0rfjf33b75544nv21uhi@4ax.com
Change 13891 used "shift left" in place of "shift right" to indicate what you
have to do to a wait() return value to get an exit status in a non-portable way.

--- pod/perlfunc.pod.orig       Wed Dec 26 20:01:31 2001
+++ pod/perlfunc.pod    Thu Dec 27 08:55:17 2001
@@ -5377,7 +5377,7 @@
 of C<IO::Handle> on any open handles.

 The return value is the exit status of the program as returned by the
-C<wait> call.  To get the actual exit value shift left by eight (see below).
+C<wait> call.  To get the actual exit value shift right by eight (see below).
 See also L</exec>.  This is I<not> what you want to use to capture
 the output from a command, for that you should use merely backticks or
 C<qx//>, as described in L<perlop/"`STRING`">.  Return value of -1
@@ -5401,7 +5401,7 @@
     $signal_num  = $? & 127;
     $dumped_core = $? & 128;

-or more portably by using the W*() calls of the POSIX extension,
+or more portably by using the W*() calls of the POSIX extension;
 see L<perlport> for more information.

 When the arguments get executed via the system shell, results
[pne@penderel bleadperl]$ diff -u pod/perlport.pod.orig pod/perlport.pod
--- pod/perlport.pod.orig       Wed Dec 26 20:01:31 2001
+++ pod/perlport.pod    Thu Dec 27 08:55:55 2001
@@ -1780,13 +1780,13 @@
 =item system LIST

 In general, do not assume the UNIX/POSIX semantics that you can shift
-the C<$?> left by eight to get the exit value, or that C<$? & 127>
+C<$?> right by eight to get the exit value, or that C<$? & 127>
 would give you the number of the signal that terminated the program,
 or that C<$? & 128> would test true if the program was terminated by a
 coredump.  Instead, use the POSIX W*() interfaces: for example, use
 WIFEXITED($?) an WEXITVALUE($?) to test for a normal exit and the exit
 value, and WIFSIGNALED($?) and WTERMSIG($?)  for a signal exit and the
-signal.  Core dumping is not a portable concept so there's no portable
+signal.  Core dumping is not a portable concept, so there's no portable
 way to test for that.

 Only implemented if ToolServer is installed. (S<Mac OS>)
End of patch.

Cheers,
Philip

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About