Oops indeed. I spent time on that for you.
Once again I don't know what your current code looks like. The code you posted above does give the error message you described, for the reason I described. Your newly posted reset_game() sub will not generate the same error, but still contains a bug. Hint: Why are you putting [$all_occurrences] within a character class to check what the user entered, when you've assigned a value of '0' to $all_occurrences? What is that supposed to do?
Dave
In reply to Re^5: Resetting variables
by davido
in thread Resetting variables
by yacoubean
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |