in reply to Re^4: hangman question
in thread hangman question

@guesses and the next OUTER were making it ignore guesses that had already been given instead of counting them as right or wrong. It would have been better to use a %guesses hash for that:
... $guess=<STDIN>; chomp $guess; next if $guesses{$guess}++; $right=0; ...
but this program seems blithely ignorant of the existence of hashes.

If you feel daring, take a look at the severely undercommented word twist for a more hash-ridden implementation of a word game.

Replies are listed 'Best First'.
Re^6: hangman question
by convenientstore (Pilgrim) on Jul 16, 2007 at 03:48 UTC
    word twist.. is crazy.. well for me. too much at this stage.. but I will try to understand it.. I just ran the program and I am not even sure what it's doing.. but looks very interesting.