The 5th century Syriac Book of Medicines prescribes pepper ( or perhaps long pepper ) for illnesses such as constipation , diarrhea , earache , gangrene , heart disease , hernia , hoarseness , indigestion , insect bites , insomnia , joint pain , liver problems , lung disease , oral abscesses , sunburn , tooth decay , and toothaches . Black Pepper ( or perhaps long pepper ) was believed to cure illness such as constipation , diarrhea , Limonene , Safrole , earache , gangrene , heart disease , hernia , hoarseness , indigestion , insect bites , insomnia , joint pain , liver problems , lung disease , oral abscesses , sunburn , tooth decay , and toothaches .