good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
RE: Re: Checking for odd/even numberby rjimlad (Acolyte) |
on May 28, 2000 at 22:02 UTC ( [id://15212]=note: print w/replies, xml ) | Need Help?? |
Yes.
$a % 2
...effectively is is_odd($a), eg:
printf $a%2?"odd\n":"even\n";
...or whatever :)
In Section
Seekers of Perl Wisdom
|
|