What could be helpful for you is the modulus operator as explained in http://perldoc.perl.org/5.8.9/perlop.html#Multiplicative-Operators. $n % $p equals zero if $p is a divisor of $n.
In reply to Re: Divisors for a number
by hdb
in thread Divisors for a number
by rasy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |