sub multi_and { my $result = shift; while (@_) { $result &= shift; } $result; }