my $key = 'cherry'; print "$key is positive!\n" if exists $strands{$key}{'+'}; print "$key is negative!\n" if exists $strands{$key}{'-'};