The question is:
Show that if $X$ is perfect and Hausdorff, then each open neighborhood of $x$ contains infinitely many points other than $x$ itself. Give an example of a space with finitely many points that is perfect.
Definition.
A topological space $X$ is perfect if every point of $X$ is an accumulation point of $X.$
Definition.
A point $x$ in a topological space $X$ is an accumulation point of $X$ if every open neighborhood $U$ of $x$ contains at least one point $y$ of $X$ besides $x$ itself.
Still, I do not know how to formulate a proof for the above question. Could anyone help me in doing so, please?
This already holds for a $T_1$ space $X$: $X$ is $T_1$ iff each singleton $\{x\}$ is closed in $X$ iff each finite subset is closed in $X$. Hausdorff implies $T_1$.
If $U$ is a neighbourhood that contains finitely many points of $X$ besides $x$, then $U$ is just a finite set containing $x$. So $U \setminus \{x\}$ is closed, being finite. Then $\{x\}= U\cap (X\setminus (U \setminus \{x\}))$ is open and a neighbourhood of $x$ that contradicts perfectness. So no such finite $U$ can exist when $X$ is perfect.
$X=\{0,1\}$ with the indiscrete topology $\{\emptyset, X\}$ is perfect and not $T_1$, so a finite perfect space can exist.