Rudin's PMA Exercise 2.18 - Perfect Sets I've been working through Chapter 2 questions and have thought about Exercise 2.18 for a while, but couldn't come up with an answer.

Is there a nonempty perfect set in R which contains no rational number?

I had a look here but I think this is wrong because obviously the Cantor set is not a subset of the rationals * (See below). Another thing that the above "solution" states is that the Cantor set only has endpoints but this is not true, e.g. 1/4 is a member of the Cantor set but is not an endpoint (See here).
Other solutions to this question based on a quick google search also give the same - seemingly incorrect - answer.
I have thought about sets like {x: Only 4 and 7 are in the decimal expansion of x, and the decimal expansion of x is non-repeating}, but this set doesn't work because 4/9 is a limit point of this set but is not a member of this set and so it is not a perfect set.
Other ideas I have come up with include starting with the irrational numbers in [0,1] and taking away lots of irrational numbers systematically, but I couldn't make this work.
The denseness of Q has something to do with it but I can't figure it out...
Any ideas?
*I say "obviously" but I should really explain myself here. The Cantor set is a perfect set, and every perfect set is uncountable, but any subset of rationals is countable.
 A: Couldn't you just perform the construction of Cantor discontinuum but starting with closed interval with irrational endpoints and excluding open subintervals with irrational endpoints and excluding them in such way that all rationals are excluded? There are only countable rationals and we are excluding countable infinite subintervals.
For any finite sequence of ones and zeros $f: n \to \{0, 1\}$, we'll define compact sets $F_f$ such that $F_{f \upharpoonright k} ⊇ F_f$ for any $k$. We'll also define $F_f := \bigcap_{n < ω} F_{f \upharpoonright n}$ for $f: ω \to \{0, 1\}$ and we want $diam(F_{f \upharpoonright n}) \to 0$ when $n \to ∞$ so $F_f$ is a singleton. Such construction gives obvious isomorphism between $\bigcap_{n < ω} \bigcup\{F_f: |f| = n\}$ and the Cantor space $2^ω$. This construction can be done in any $\mathbb{R}^n$.
In our case, $F_∅ := [a, b]$ for $a, b$ irrational. $U_f$ will be open subinterval of $F_f$ with irrational endpoints so $F_f \setminus U_f$ are two disjoint closed intervals. These will be $F_{f ∪ ⟨|f|, 0⟩}$ and $F_{f ∪ ⟨|f|, 1⟩}$. Since $F_∅$ and $U_f$ have irrational endpoints, by induction, all $F_f$ have irrational endpoints. So when $\mathbb{Q} = ⟨a_n: n ∈ ω⟩$ and $a_n ∈ F_f$ and $|f| = n$, we can choose $U_f$ so it contains $a_n$. And hence the constructed copy of Cantor set contains no rationals.
