in reply to Perl & modulus

What kind of loop are you trying to perform that you think you need a module for? e.g., Perl has a few looping constructs built into it; can you say what you're missing in them? (Yes, there are modules for loops but you don't reach out for the railgun when the banana peel suffices.) Ah, you really did mean modulus. Sorry, I don't understand the question. What does looping using modulus mean?

To check if a number $num is divisible by $divisor, use the modulus operator, %:

if ($num % $divisor) { # does not divide cleanly } else { # does. }