Help for this page

Select Code to Download


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