use Quantum::Superpositions; my @set = (1, 2, 3, 4, 5); print "3 is a member!\n" if 3 == any(@set); print "8 is a member!\n" if 8 == any(@set);