use Quantum::Superpositions; if ($x == any(@list)) { ... }