It is narrated from Hazrat Sahl bin Sa’d (may Allah be pleased with him) that once a man began to peep through a hole into the blessed chamber of the Holy Prophet (peace and blessings be upon him). At that time, the Holy Prophet (peace and blessings be upon him) had a comb in his blessed hand, with which he was combing his hair. The Holy Prophet (peace and blessings be upon him) said, “If I had been sure that you were looking, I would have struck your eyes with this comb. Permission has been prescribed only because of the gaze.”
Hadith Referenceمسند احمد / مسند الأنصار رضي الله عنهم / 22833