Let $R$ be a commutative ring with identity, and let $Z(R)$ be the set of zero-divisors of $R$. The total graph of $R$ is the graph $T(\Gamma(R))$ whose vertices are all elements of $R$, and two distinct vertices $x$ and $y$ are adjacent if and only if $x+y\in Z(R)$. We investigate the perfectness of the graphs $Z_0(\Gamma(R))$, $T_0(\Gamma(R))$ and $T(\Gamma(R))$, where $Z_0(\Gamma(R))$ and $T_0(\Gamma(R))$ are (induced) subgraphs of $T(\Gamma(R))$ on $Z(R)^*=Z(R)\smallsetminus\{0\}$ and $R^*=R\smallsetminus\{0\}$, respectively.