in reply to Re^5: why is my for loop using modulo giving me a weird output
in thread why is my for loop using modulo giving me a weird output
I used "use integer;" wouldn't this be correct? or should I add the int while doing the operation $i%5.
use strict; use warnings; use integer; use constant number => 5;
if I have to add this here, what situation am I avoiding?
I don't quite understand this
to chop off the fractional component for $quoprint "this is the quotient",int $i/5,"\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: why is my for loop using modulo giving me a weird output
by ww (Archbishop) on Jun 28, 2015 at 11:35 UTC | |
|
Re^7: why is my for loop using modulo giving me a weird output
by marinersk (Priest) on Jun 29, 2015 at 14:29 UTC |