in reply to Need help with a Mastermind game

Sorry, got not that much time now, but I think there goes something wrong in your
foreach(@correctguesses) { splice(@their_guess,$_,1); } foreach(@getridofthese) { splice(@newpattern_to_match,$_,1); }
I think not all 'right ones' are removed here !?

Have you tried it with a debugger. ptkdb is a very helpful one.
Hope it helps.

----------------------------------- --the good, the bad and the physi-- -----------------------------------