$result = $guess <=> $target; $min = $guess if $result == -1; $max = $guess if $result == 1;