my @l1 = qw(education production results); my @l2 = qw(education joe bob carl production steve results tests); my %h1; undef @h1{@l1}; my @o2 = grep { not exists $h1{$_} } @l2;