Help for this page
elsif ( $input ne 'good' and ... ){ next; }
elsif ( $input !~ /good|bad|iffy/ ){ next; }
my %lookup = ( good => undef, ... ); # and then within your loop next unless exists $lookup{$input};