You want the modulus operator (%), same as in Java. I.e., perl -e 'print(5 % 3, $/)'. See perlop.
In reply to Re: mathematical operators
by djantzen
in thread mathematical operator for integer division, "div" ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |