If $string is not X and $string is not Y #### if($string ne 'Y' && $string ne 'Y') #### If $string is A or $string is B #### if($string eq 'A' or $string eq 'B')