use Quantum::Superpositions; my $list1 = [1,2,3]; my $list2 = [4,5,6]; print "No common items" if all(@$list1) != all(@$list2);