Results 1 to 2 of 2
Thread: Remainder of a division in Perl
January 23rd, 2009, 10:29 AM #131Registered User
Remainder of a division in Perl
If I'm carrying out a division, say with $a=57 and $b=5, if I carry out a division $a/$b, I would like the remainder in another variable, say $c - how do I do that?
January 23rd, 2009, 10:53 AM #21,627hugeExplosions = true;
You use the modulo operation (%) to find the remainder after division by a number
$c = $a % $bMS Paint FTW!