This is rather a gruesome tale, but definitely has a moral. Again from Scottish Fairy and Folk Tales, by George Douglas, published in 1901.