# New Ticket Created by mhasch@cpan.org # Please include the string: [perl #50364] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=50364 > This is a bug report for perl from mhasch@cpan.org, generated with the help of perlbug 1.36 running under perl 5.10.0. ----------------------------------------------------------------- There is a misnomer in the documentation of the % operator. You don't calculate the modulus of two numbers. You calculate the common residue or remainder of a number with respect to a modulus. Thus, in "A = B % C", C is the modulus, while A should be called something like common residue or remainder in integer division. I suggest to fix the paragraph on % in perlop.pod with the patch attached below. Martin Becker (aka Martin Hasch) <mhasch(at)cpan.org> diff -ru perl-5.10.0/pod/perlop.pod perl-5.10.0-patched/pod/perlop.pod --- perl-5.10.0/pod/perlop.pod Tue Dec 18 11:47:08 2007 +++ perl-5.10.0-patched/pod/perlop.pod Tue Jan 29 00:19:31 2008 @@ -260,7 +260,7 @@ Binary "/" divides two numbers. X</> X<slash> -Binary "%" computes the modulus of two numbers. Given integer +Binary "%" computes the division remainder of two numbers. Given integer operands C<$a> and C<$b>: If C<$b> is positive, then C<$a % $b> is C<$a> minus the largest multiple of C<$b> that is not greater than C<$a>. If C<$b> is negative, then C<$a % $b> is C<$a> minus the ----------------------------------------------------------------- --- Flags: category=docs severity=low --- Site configuration information for perl 5.10.0: [Deleted -- platform details considered irrelevant]Thread Next