perlynewby has asked for the wisdom of the Perl Monks concerning the following question:
I am using a for loop to get all the numbers divisible by 5 over 0 to 20(just a random num for now) but I don't understand the behavior now...please explain what i am not seeing
ultimately, I want to find all the number divisible by even numbers over a range of 0 to 10
use strict; use warnings; use integer; use constant number => 5; my %result; for ( my $i=0; $i<=20 ;$i++){ print $i%5,"\n"; #here to test for % at even numbers }
output
0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0
|
|---|