perl's % operator is the "modulus" (aka "mod") operator -- in other words, it gives you an integer representation of the remainder of a division operation.
If X / Y divides evenly (that is to say, there's no remainder (or modulus)), the result of X % Y will be zero.
In reply to RE: Checking for odd/even number
by cciulla
in thread Checking for odd/even number
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |