sub countbits { my($n, $count) = ($_[0], 0); ++$count, $n &= $n - 1 while $n; return $count; } sub test7 { my($iDays, $iCmp) = @_; return countbits($iDays & $iCmp); }