my %big_set; @big_set{ @big_array } = (); my @find = qw( this that other ); my $found = grep{ exists $big_set{$_} } @find; print "Success!\n" if $found == 3;