# One argument is true sub any { $_ && return 1 for @_; 0 } #### sub any(&@) { my $code = shift; $code->() && return 1 for @_; 0 } #### my $has_undefs = first { not defined } @list; #### sub count(&@) { my $code = shift; scalar grep { $code->() } @_ }