use Quantum::Superpositions; if ( any("tall", "rich", "handsome") eq all('tall', 'rich', 'handsome') ) { print "match1\n"; } if ( all("tall", "rich", "handsome") eq any('tall', 'rich', 'handsome') ) { print "match2\n"; } #prints: match2