To prove that the Cantor set $C$ is perfect, for each $x \in C$ and for each $\epsilon > 0$ one must find a point $y \in C - \{x\}$ such that $|x-y| < \epsilon$.
To search for $y$, recall that $C$ is constructed as the intersection of sets $C_0 \supset C_1 \supset C_2 \supset C_3 \supset \cdots$ where $C_n$ is a union of $2^{n}$ disjoint intervals each of length $3^{-n}$, and recall also that $C$ has nonempty intersection with each of those $2^n$ intervals.
Choose $n$ so that $3^{-n} < \epsilon$.
Let $[a,b]$ be the interval of $C_n$ that contains $x$.
When the middle third is removed from $[a,b]$, one gets two intervals $[a,b']$, $[b'',b]$ of $C_{n+1}$. The point $x$ is contained in one of those two intervals, and there is a point $y \in C$ that is contained in the other one of those two intervals. So $y \ne x$ and $|x-y| < \epsilon$.