As pointed out, it's not difficult to do it with just a few lines of code. If you wanted to, you could also just create a subroutine like the untested code below:
use strict; use warnings; sub modulo { my $number = shift; my $divisor = shift; my $remainder = $number % $divisor; my $quotient = ($number - $remainder) / $divisor; return ($remainder, $quotient); }
In reply to Re: Modulo operation to return quotient and remainder
by dasgar
in thread Modulo operation to return quotient and remainder
by darklord_999
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |