in reply to Re: Seeing if two numbers have the same sign
in thread Seeing if two numbers have the same sign
sub same_sign { (0 <=> $_[0]) == (0 <=> $_[1]) || (! $_[0] || ! $_[1]); }
to check for either operand being somewhat false ;-)
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|