while(true){ gallows($bad_guesses); print @word_so_far, "\n"; print @alphabet, "\n"; if ($bad_guesses == 6){ $computer_won = 1; last; } if ($good_guesses == $number_of_letters){ $player_won = 1; last; } print "Please pick a letter.\n"; # Add a body part if $guess is not in the word. erase_guess(); # Fill in spaces if it is. add_part($guess); }