notall#

True if the block returns false for at least one element.

תקציר#

my $bool = notall { BLOCK } @list;
warn "some missing" if notall { defined } @values;

For each element notall sets $_ to that element and calls the block in scalar context. It returns true as soon as the block returns false for any element. An empty list yields false.

מה מוחזר#

1 if at least one element failed the block, 0 otherwise.

דוגמאות#

my $incomplete = notall { defined } @row_cells;
warn "stale" if notall { $_->is_fresh } @entries;
my $false = notall { 1 } ();             # 0 - nothing to fail

הבדלים מן ה-upstream#

Fully compatible with upstream.

ראו גם#

  • all - inverse: require every element to match.

  • any - at least one match.

  • none - zero matches.