Help for this page

Select Code to Download


  1. or download this
    if( grep { $_ eq $test } ( $item1, $item2 ) ) {
        #..... This was an "or"
    ...
    if( grep { $_ eq $test } ( $item1, $item2 ) == 2 ) {
        #..... This was an "and"
    }
    
  2. or download this
    use List::MoreUtils qw/ any all /;
    
    ...
        print "True.\n";
        # This one is NOT true, because only one of the three elements mat
    +ched.
    }
    
  3. or download this
    use Quantum::Superpositions;
    
    ...
        print "True.\n";
        # This one fails because only one, not all elements matched.
    }