Your formatting and your {} block structure do not match. The last line of your until loop is chomp $answer. Remove the } from in front of the next if and all should be well again.
Update:You'll also need to add a closing brace after your else block. Suggested form:
until ($COND) {
some($stuff);
if ($THIS) {
do($that);
}
else {
do($anything);
}
}