Works fine until you want to see if an array contains any false values...
use Data::Dumper; use List::Util (); sub any (&@) { my $x = &List::Util::first; defined $x } my @x = (1..3, undef, 5..10); # undef is false print Dumper(any { !$_ } @a);
In reply to Re^5: Smartmatch alternatives
by tobyink
in thread Smartmatch alternatives
by cavac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |