I want to prove the following
If $S$ is an open subset of a perfect metric space $(M,d)$ then $\text{clr}S$ is perfect.
By definitoin $S$ is perfect if and only if
$$S=\text{der}S,$$
where $\text{der}S$ is the derived set or the set of all accumulation points of $S$. This is equivalent to
$$S\subset \text{der}S\,\land \text{der}S\subset S.$$
We know that
$$\text{clr}S=S\cup\text{der}S,\tag{1}$$
which implies that $\text{der}S\subset S$ if and only if $\text{clr} S = S$. This means that $S$ is perfect if and only if
$$S\subset\text{der} S\,\land\,\text{clr}S=S.$$
Since we want to show that $\text{clr} S$ is perfect then we should show that
$$\text{clr}S \subset\text{der}\,\text{clr}S \,\land\, \text{clr}\,\text{clr}S=\text{clr}S$$
The $\text{clr}\,\text{clr}S=\text{clr}S$ is trivial as $\text{clr}S$ is a closed set in $M$. It remains to show that
$$\text{clr}S \subset\text{der}\,\text{clr}S.$$
Choose any $x\in S$ and let $r>0$ be given. We show that $T:=B_M(x,r)\cap S$ contains a $y\ne x$. Since $S$ is open then $T$ is open and there is a ball $B_M(x,\epsilon)\subset T$. Since $T\subset S\subset M$ then $x\in M$ and $M$ is perfect so there is a $y\ne x$ in $M$ such that $y\in B_M(x,\epsilon)\cap M = B_M(x,\epsilon)$, which means that there is a $y\ne x$ such that $y\in T$. This implies that $x\in \text{der} S$. Consequently, we have $S \subset \text{der} S$. Using Equation $(1)$, this is equivalent to $\text{der} S = \text{clr} S$.
I got stock right here! Can you give me a hint?