That'll learn him
That will teach him a lesson for doing that.
Heard in Wicklow
Did ya see Gerry fell into a bunch a nettles? That'll learn him the scobster.

Good day to you.
Here it is in posh English.
Did you observe Gerry tumbling into a patch of nettles? That shall teach the rascal a lesson.
Updated