- or download this
if( grep { $_ eq $test } ( $item1, $item2 ) ) {
#..... This was an "or"
...
if( grep { $_ eq $test } ( $item1, $item2 ) == 2 ) {
#..... This was an "and"
}
- 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.
}
- or download this
use Quantum::Superpositions;
...
print "True.\n";
# This one fails because only one, not all elements matched.
}