```{index} single: none; List::Util function ``` ```{index} single: List::Util::none; Perl function ``` # none True if the block returns true for no element (including empty list). ## Synopsis ```perl my $bool = none { BLOCK } @list; if ( none { $_ < 0 } @measurements ) { ... } ``` For each element `none` sets `$_` to that element and calls the block in scalar context. It returns false as soon as the block returns true for any element. An empty list yields true. ## What you get back `1` if every element failed the block, `0` otherwise. ## Examples ```perl die "negatives present" unless none { $_ < 0 } @measurements; my $clean = none { /ERROR/ } @log_lines; my $none = none { 1 } (); # 1 — nothing to fail ``` ## Differences from upstream Fully compatible with upstream. ## See also - `any` — inverse: at least one match. - `all` — require every element to match. - `notall` — at least one failure.