- or download this
sub any {
my $code_ref = shift;
reduce { $a or $code_ref->(local $_ = $b) } @_;
}
- or download this
sub any(&@) {
my $code_ref = shift;
reduce { $a or $code_ref->(local $_ = $b) } @_;
}
- or download this
<strike>print "true\n" if any { $_> 11 } qw /3 12 4 5 7/; # prints tru
+e
- or download this
print "true\n" if any { $_> 11 } 0, qw /3 12 4 5 7/; # prints true