What you give as the definition of compact set is actually the definition of sequentially compact set; the two properties are equivalent in metric spaces but not in general. In general a set $K$ in a topological space $X$ is compact if every open cover of $K$ has a finite subcover. This means that if $\mathscr{U}$ is a family of open sets such that $K\subseteq\bigcup\mathscr{U}$ (i.e., $\mathscr{U}$ is an open cover of $K$), then there is a finite subcollection $\mathscr{U}_0\subseteq\mathscr{U}$ such that $K\subseteq\bigcup\mathscr{U}_0$. This no longer looks at all like the definition of a perfect set.
Your definition of perfect set is correct: $P$ is perfect if $P=P'$. In Hausdorff spaces (and hence certainly in metric spaces) this is equivalent to saying that $P$ is an infinite closed set with no isolated points.
Even in metric spaces the two are definitely not the same. This can already be seen in the familiar space $\Bbb R$. The set
$$S=\{0\}\cup\left\{\frac1n:n\in\Bbb Z^+\right\}\;,$$
for example, is an infinite compact subset of $\Bbb R$ that is certainly not perfect: $S$ consists mostly of isolated points, and $S'=\{0\}$. On the other hand, $\Bbb R$ itself is a perfect subset of $\Bbb R$ that is not compact. The closed ray $[0,\to)$ is another, as is
$$\bigcup_{n\in\Bbb Z}[2n,2n+1]=\ldots\cup[-4,-3]\cup[-2,-1]\cup[0,1]\cup[2,3]\cup[4,5]\cup\ldots\,\;.$$
What is true in $\Bbb R$ (and in fact in $\Bbb R^n$ for all $n$) is that every uncountable closed set contains a perfect subset.
Cantor set is defined as $C=\cap_n C_n$ where $C_{n+1}$ is obtained from $C_n$ by dropping 'middle third' of each closed interval in $C_n$
As you have noted, Cantor set is bounded.
Since each $C_n$ is closed and $C$ is an intersection of such sets, $C$ is closed (arbitrary intersection of closed sets is a closed set).
As $C$ is closed and bounded, it is compact by Heine-Borel theorem.
PS: You cannot say that Cantor set is a union of closed intervals. Rudin is giving Cantor set as an example for a perfect set that contains no open interval!
Best Answer
Let $C_n=\frac{C_{n-1}}{3}\cup \left(\frac{2}{3}+\frac{C_{n-1}}{3}\right)$ with $C_0=[0,1]$.
$C_n$ is closed
$C_n$ is contained in $[0,1]$
Every interval in $C_n$ is at maximum $(\frac{2}{3})^n$ in length
Cantor set is defined as:
$C:=\cap_{n=0}^{\infty}C_n$
By definition it is clear that
it is bounded (is contained in $[0,1]$)
it is closed (is the infinite intersection of closed sets)
Every neighborhood of a point in $C$ must contain another point of $C$at least: you can prove it using the third property of $C_n$
Note that this property is noteworthy, since the set is totally disconnected
Rigorous proof: By simple computations, you can note that the Cantor set consists of all the real numbers of the unit interval that do not require 1 in their ternary expansion. Thus, for every $c\in C=0.c_1c_2\dots$, there exists, for all $n$, a number $c_n \in C$ such that $|c-c_n|<3^{-n}$, constructed in this way: truncate $c$ to the $n+1$-th digit, and substitute it with $2$ if it is $0$ and viceversa. The number so constructed is still in $C$, and has a distance from $c$ of $\frac{2}{3}\cdot 3^{-n}$.