in reply to If condition operator
Could use a regular expression: if $bands[0]=~/^(?:red|green|blue|yellow)$/