Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Match multiple numberby tobyink (Canon) |
on Aug 17, 2018 at 18:45 UTC ( [id://1220531]=note: print w/replies, xml ) | Need Help?? |
Use modulo arithmetic.
Alternatively, as all multiples of five end in a 5 or a 0, you can do something like this:
In both these cases, I'm allowing negative values, like -5 and -10. If you prefer to only allow non-negative values:
In Section
Seekers of Perl Wisdom
|
|