in reply to Adding one last conditional in a random-number guessing game
So you want the record of $program_guesses carried over from game to game? You appear to confirm that in your Re^2: Adding one last conditional in a random-number guessing gamein response to hdb's Re: Adding one last conditional in a random-number guessing game.
And do you want the guess record carried over from execution to execution of the game?
That would entail keeping your record of the guesses -- hash, array or list -- in a (tied-)file
...and would mean the game could never be "played" more than 10 times!
Update: that is "never" without making the record inaccessible to the script (in effect, deleting the record).
Are you sure you understood your homework assignment correctly? Could it be that the user should not be allowed to guess the same number twice in the course of a single game?