Spare the rod and spoil the child. Proverbs 13:24
That passage has nothing to do with corporeal punishment.