That'll learn ya
That event will teach you a lesson you won't forget.
Heard in Dublin
The young lad burned his hand on the kettle and his mother said, 'That'll learn ya

Greetings and felicitations.
Here it is in posh English.
The young fellow scorched his digit upon the tea urn, whereupon his mother remarked, That incident shall instruct you.
Updated