On 3 Aug 2004, at 13:26, [EMAIL PROTECTED] wrote:
Does anyone know a simple way to determine if a number is odd or even?
Use the modulus operator. If $foo % 2 has remainder 1, then it is odd, if it has remainder 0, then it is even.
-- David Dorward <http://dorward.me.uk/> <http://blog.dorward.me.uk/>
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>