Hello all!
Yes its me again!
What funtion in Perl determines if a variable is divisible by a specified interger?
Example: I need blue!
if ($i is divisible by 2 == 0) {
$x = 1;}
else { $x = 0; }
-or-
What funtion gets the remander from division. I could be mistaken, but as I recall from when I studied C ++ a hundred years ago that the "%" was used. 5%2=1 4%2=0
Example: I need green!
if ($i % 2 == 0) {
$x = 1;}
else { $x = 0; }
Thanks,
beetleman
beetleman
Marcus L. Griswold
Yes its me again!
What funtion in Perl determines if a variable is divisible by a specified interger?
Example: I need blue!
if ($i is divisible by 2 == 0) {
$x = 1;}
else { $x = 0; }
-or-
What funtion gets the remander from division. I could be mistaken, but as I recall from when I studied C ++ a hundred years ago that the "%" was used. 5%2=1 4%2=0
Example: I need green!
if ($i % 2 == 0) {
$x = 1;}
else { $x = 0; }
Thanks,
beetleman
beetleman
Marcus L. Griswold