Your reasoning is not correct. There's no reason to believe that $N\cap X=\{p\}$ implies that $N$ is closed. Besides that, you're trying to actually prove that a connected space has no isolated points, and even this is not true, for instance the topological space consisting of just one point is connected but has isolated points. Outside of that, you can fix your argument to prove that if a space with at least two elements where points are closed and is connected, then it has no isolated points, by concluding that $\{p\}$ is clopen.
That being said, for a set to be perfect, as noted in the comments, you need the set to be closed. Since every space is closed with respect to itself you get that for free, but in general, a set might be connected but not perfect, even if points are closed, for instance, $(0,1)$ is a connected subset of $[0,1]$ but it's not perfect as it's not closed.
All in all, you can tweak your arguments so that you prove that in every connected space where points are closed you have no isolated points (which in turn makes it perfect with respect to itself), but not that a subset of a topological space is perfect just by being connected, even in the case where points are closed