develooper Front page | perl.perl5.porters | Postings from September 2009

shift exit status right 8 in system

Thread Next
From:
Boyce, Greg
Date:
September 23, 2009 11:49
Subject:
shift exit status right 8 in system
Message ID:
159FD28F03D76E468EE6650EB50072D007913356@S0-OTT-X2.nrn.nrcan.gc.ca
On System page:
	http://perldoc.perl.org/functions/system.html 

there is error regarding the phrase: "To get the actual exit value,
shift right by eight (see below).".

The code shows:
	elsif ($? & 127) {
This is a bitwise And, not a Shift Right.  The code should read:
	elsif ($? >> 8) {

Cheers,
G.Boyce

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