Abu Dawud Book 1, Hadith Number 249.

Chapter : A person who is sexually defiled is permitted to eat anything before washing.

Narated By Ali ibn Abu Talib : The Apostle of Allah (PBUH) said: If anyone who is sexual defiled leaves a spot equal to the breadth of a hair without washing, such and such an amount of Hell-fire will have to be suffered for it. Ali said: On that account I treated my head (hair) as an enemy, meaning I cut my hair. He used to cut the hair (of his head). May Allah be pleased with him.