An element a of a ring R is called perfectly clean if there exists an idempotent e ∈ comm 2 (a) such that a − e ∈ U (R). A ring R is perfectly clean in case every element in R is perfectly clean. In this paper, we investigate conditions on a local ring R that imply that 2 × 2 matrix rings and triangular matrix rings are perfectly clean. We shall show that for these rings perfect cleanness and strong cleanness coincide with each other, and enhance many known results. We also obtain several criteria for such a triangular matrix ring to be perfectly J-clean. For instance, it is proved that for a commutative ring R, Tn(R) is perfectly J-clean if and only if R is strongly J-clean.