  The directed power graph $\vec{\mathcal P}(\mathbf G)$ of a group $\mathbf G$
is the simple digraph with vertex set $G$ such that $x\rightarrow y$ if $y$ is
a power of $x$. The power graph of $\mathbf G$, denoted by $\mathcal P(\mathbf
G)$, is the underlying simple graph. The enhanced power graph $\mathcal
P_e(\mathbf G)$ of $\mathbf G$ is the simple graph with vertex set $G$ in which
two elements are adjacent if they generate a cyclic subgroup.
  In this paper, it is proven that, if two groups have isomorphic power graphs,
then they have isomorphic enhanced power graphs, too. It is known that any
finite nilpotent group of order divisible by at most two primes has perfect
enhanced power graph. We investigated whether the same holds for all finite
groups, and we have obtained a negative answer to that question. Further, we
proved that, for any $n\geq 0$ and prime numbers $p$ and $q$, every group of
order $p^nq$ and $p^2q^2$ has perfect enhanced power graph. We also give a
complete characterization of symmetric and alternative groups with perfect
enhanced graphs.
