If you've done something foolish or made a mistake then an on-looker might say 'That'll larn yer'. You'll learn!