use Quantum::Superpositions; if ( $x == any(1,3,7) ) { ... }