if (exists $hash{$nam[0]}) #### if ( grep { exists $hash{$_} } @nam )