darklord_999 has asked for the wisdom of the Perl Monks concerning the following question:
Is there any way that we can get the quotient and remainder for a modulus operation in perl ?
For example : I have a variable $var = 4999. I perform a modulo operation on it (%100) and get values of 49(quotient) and 99 (remainder) and assign it to two different variables.
Is there any module or way to do this in perl ?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Modulo operation to return quotient and remainder
by kcott (Archbishop) on Jul 11, 2012 at 19:52 UTC | |
by Anonymous Monk on Sep 08, 2015 at 15:37 UTC | |
Re: Modulo operation to return quotient and remainder
by davido (Cardinal) on Jul 11, 2012 at 22:30 UTC | |
Re: Modulo operation to return quotient and remainder
by dasgar (Priest) on Jul 11, 2012 at 19:56 UTC | |
Re: Modulo operation to return quotient and remainder
by moritz (Cardinal) on Jul 12, 2012 at 11:54 UTC | |
by Borodin (Sexton) on Jun 07, 2017 at 21:49 UTC | |
Re: Modulo operation to return quotient and remainder
by bart (Canon) on Jul 11, 2012 at 23:30 UTC |
Back to
Seekers of Perl Wisdom