unless ( exists $not_allowed{ $input } ) { # do your stuff }