(defined $alphabet{$s} ? $alphabet{$s} : 0) % 2 # use exists() if all values of %alphabet are defined