if ($guess was right) { continue(); } else { exit; } sub continue() { ask user to enter y or n read in answer chomp answer lowercase input #or uppercase I just like lower default input to n unless it is y or n #or y if you were a real hussler return answer }