in reply to Check even numbers?

You can use the modulus operator for that.

my $is_even = $number % 2 == 0; my $is_odd = $number % 2 == 1;

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)