On Oct 15, 2005, at 0:02, ZHAO, BING wrote:

Hi,
Is there a remainder function, since I need to check if a number is divisible by another?

Yes, the modulus operator:

    print "$n is divisible by $m" if $n % $m == 0;

-- fxn



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to