Sefer Chassidim, Siman 148
Three things did the Holy One Blessed be He create in man, ears, eyes and the tongue, and to each one of them he created barriers and a wall to protect them…He put eyelids for the eyes in order to cover them and hide them from looking at something evil. And the man who transgresses and hears sin or if his eyes see sinful things and his tongue speaks evil then the person did not guard what the Master of the World gave him to guard, he broke the fence and about him it is written: "He who breaks a fence will be bitten by a snake" - (Kohelles 10:8)