in reply to Comparison between a string and an array

Modifying slightly your code (and avoiding smart match):
my %answer = map {$_, 1} ( "Bad", "Good", "Not good enough" ); chomp(my $user_answer=<STDIN>); if (defined $answer{$user_answer}) { print "Ok\n"; }

Je suis Charlie.