#!/usr/bin/perl use strict; use warnings; use Quantum::Superpositions qw/any/; use Data::Dumper; my @one = qw /foo bar buz/; my @two = qw /qux quux bar/; my @junction = eigenstates(any(@one) eq any(@two)); print Dumper \@junction;