use Quantum::Superpositions; # Create a disjunction of 'a' and 'b'. $dis = any( 'a', 'b' ); $dis =~ /.*/ && print $&;