in reply to Re: Re: Re: mod function
in thread mod function
To me the advantage of:
if ($y % 3 == 0) { }
is that you are explicitly stating that you are testing for a modulus being zero.
With:
unless ($y % 3) { }
you are saying you are interested in Perl's idea of the statement's truth/falsehood - which is a subtly different concept.
|
|---|