Working out a small problem, I have a need of a Perl snippet which might look something like this:
use integer;
...
if ($changingNumber / 2)
{
do something;
}
else
{
do something else;
}
...
What I want to happen is for "if" to resolve as "true" every time a whole number is produced by the quotient of "$changingNumber / 2"; allowing the "do something" block only then to be executed.
But what I get, instead, is the eval of "true" and the consequent "do something" block execution for every value of "$changingNumber" of 2 and greater.
I know this is probably a simple error on my part, but I can't quite elucidate what would do the trick here...
Any ideas?
Thanks!