(exists $hash{$_} and $hash{$_} eq 'on') ? ($result = 'OK') : ($result = 'KO');