Perl - Adding Choices

Well, the homework assignment from the last lesson was to consider the programming elements that you would need to accomplish the task of having a Perl program greet you in a special way.  The way I figured it, I needed to be able to compare a name that is entered with my (your) name, and if it's the same, then do something special.  So, we could add a C-like if-then-else branch and a comparison to the program.

#!/usr/bin/perl -w
print "What is your name? ";
$name = <STDIN>;
chomp ($name);
if ($name eq "Larry") {
	print "Hello, Larry!  How good of you to be here!\n";
}
else {
	print "Hello, $name!\n"; # ordinary greeting
}

What's new here is the eq operator and the if statement.  The eq operator compares two strings.  If they are "equal" (character for character, and have the same length), the result is true.  (There's no comparable operator [there is a libc sub-routine] in C or C++.)

The if statement selects which block of statements (between matching curly braces) is executed; if the expression is true, then it's the first block, otherwise it's the second block.

Ever onward!  Ever upward!  Next lesson, let's have the person who will be running your program guess a secret word.  That is, for everyone but yourself, we'll have the program repeatedly ask for guesses until the person guesses properly.  Now, what programming elements do you suppose are required to accomplish this task?