On Sat, 2010-05-01 at 07:15 -0400, Paul wrote: > Hello all. How can I test to see if a number is divisible by say, 40?
Use the modulo operator:
my $a = 40;
my $b = 1;
if ($a % $b == 0) {
print "$b is divisible by $a\n";
}
-j
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/
