I give an explanation that avoids the pejorative comments of Engineer.
First question: can you explain me these two definitions of perfect code?
Those are not two definitions of perfect codes but rather a single somewhat poorly-phrased definition of a perfect code. It should read
A perfect (binary) $t$-error-correcting code of block length $n$ is a ...