[comp.lang.perl] -6%5 under Patchlevel 27

alanm@cognos.UUCP (Alan Myrvold) (08/16/90)

I've run into a problem while playing with '%' under Patchlevel 27.
It seems to work if the first argument is a variable.

For example:

   $a = -6;
   $b = $a % 5;  
   $c = -6 % 5;
   $, = ' '; $\ = "\n";
   # Should print "-6 4 4", for me (PL 27) I get "-6 4 5"
   print $a,$b,$c;   

Using :        Patch level: 18        I get :     -6 4 4
Using :        Patch level: 27        I get :     -6 4 5

This is under SunOS 4.0, and :
% perl -v | head -2
$Header: perly.c,v 3.0.1.6 90/08/09 04:55:50 lwall Locked $
Patch level: 27

                                          - Alan

---
Alan Myrvold          3755 Riverside Dr.     uunet!mitel!sce!cognos!alanm
Cognos Incorporated   P.O. Box 9707          alanm@cognos.uucp
(613) 738-1440 x5530  Ottawa, Ontario       
                      CANADA  K1G 3Z4