in reply to Re^6: Repeat question (redo)
in thread Repeat question

It returns true if its argument is defined and false otherwise. See perldoc -f defined.

The first time through the loop, $input is undefined so we don't want to try to compare it with anything and we equally don't want to warn the user that their guess was wrong when they haven't even entered a guess yet.