pcouderc has asked for the wisdom of the Perl Monks concerning the following question:
Why "porter" is not 0 ?a=(6) uuu=(0) ported=(1) porterb=() porter=() porter is defined
Thank youmy $a = 6; my $porter = ($a & 1) != 0; my $ported = ($a & 2) != 0; my $uuu = ($a & 1); $porterb = ($uuu) != 0; $ppp=(defined($porter)? 'defined':'undefined' ); print STDERR "a=($a) uuu=($uuu) ported=($ported) porterb=($porterb) porter=($porter) porter is $ppp \n" ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Why my variable is not 0 ?
by choroba (Cardinal) on Jan 08, 2016 at 14:04 UTC | |
by pcouderc (Monk) on Jan 08, 2016 at 15:09 UTC | |
by Athanasius (Archbishop) on Jan 08, 2016 at 15:17 UTC | |
by pcouderc (Monk) on Jan 08, 2016 at 15:34 UTC | |
|
Re: Why my variable is not 0 ?
by toolic (Bishop) on Jan 08, 2016 at 14:04 UTC | |
|
Re: Why my variable is not 0 ?
by LanX (Saint) on Jan 08, 2016 at 14:04 UTC | |
|
Re: Why my variable is not 0 ?
by Tommy (Chaplain) on Jan 08, 2016 at 23:20 UTC |