hiX0r has asked for the wisdom of the Perl Monks concerning the following question:
Can anyone explain this:
my $mod = 10 % 2; print "mod = $mod\n";
mod = 0
and this:
my $mod = 119.5 % 59.75; print "mod = $mod\n";
mod = 1
I do not see why there should be a difference... Anyone knows an answer?
Am I missing something primitive?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Operator % (mod) bug ?
by Corion (Patriarch) on Feb 09, 2012 at 13:41 UTC | |
by hiX0r (Acolyte) on Feb 09, 2012 at 13:57 UTC | |
|
Re: Operator % (mod) bug ?
by choroba (Cardinal) on Feb 09, 2012 at 14:00 UTC |