in reply to Control Structure problem, mistake can't be found

My bet is with the first reply -- if the user is entering answers at the keyboard, perl is reading the final "\n" that has to be typed in order to complete each input, and you have to use "chomp" to get rid of that.

As for making progress, you made the task harder for us (and less helpful for you) by showing us disjointed snippets and leaving things out. Next time, see if you can create a short script that can be run by itself and will demonstrate the problem you are having. For instance, your post could have been like this:

Why is it that the script below always prints "huh?", even though I definitely provide the input that should produce a different output?
#!/usr/bin/perl use strict; my @answers = ( 'me', 'you' ); print "Who needs more help, me or you? "; my $response = <STDIN>; if ( $response eq $answers[0] ) { print "Good luck with that.\n"; } elsif ( $response eq $answers[1] ) { print "So help me!\n"; } else { print "huh?\n"; }

Given a situation like that, the vast majority of monks could tell you immediately, with no questions or doubt, that you need to "chomp" the input when reading from STDIN. (Or else they would tell you where to read about that in docs, tutorials, books, etc.)