Fetching details from the dictionary...

to learn by experience; to learn one's lesson; to learn the hard way
to be discouraged (by); to have enough (of); to be disgusted (with)
前回の失敗に懲りて今回は慎重に計画を立てた。
Having learned from failure, I became cautious.
彼は懲りずに同じ過ちを繰り返す。
He repeats the same mistakes without learning.
一度痛い目に遭って懲りたはずだ。
He should have learned after getting burned once.