develooper Front page | perl.perl5.porters | Postings from October 1999

[ID 19991022.018] Wacky modulus behaviour

Thread Next
Nathan Torkington
October 22, 1999 20:37
[ID 19991022.018] Wacky modulus behaviour
Message ID:
perl -le 'print time % -60'
perl -le '$x = time; print $x % -60'
perl -le '$x = time; $y = $x % -60; print $y'

Until you do it in separate steps, 'time % -60' is never negative.
This smells like a spurious NV conversion.  Somewhere.


Message from the perl bug squashing team at ''

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About