let $g=(v(g),e(g))$ be a graph, $gamma_t(g)$. let $ooir(g)$ be the total domination and oo-irredundance number of $g$, respectively. a total dominating set $s$ of $g$ is called a $textit{total perfect code}$ if every vertex in $v(g)$ is adjacent to exactly one vertex of $s$. in this paper, we show that if $g$ has a total perfect code, then $gamma_t(g)=ooir(g)$. as a consequence, ...