You will want to repeat the $key eq 'something' bit, or have possible matches in a pattern match a la /(TITLE|GENE|CYTOBAND|etc..)/, or have the possible matches in an array and grep through it (perldoc -f grep), or in a hash and do one if exists $hash{$key}....