Discipline your children, for in that there is hope;
do not be a willing party to their death.
Folly is bound up in the heart of a child,
but the rod of discipline will drive it far away.
Do not withhold discipline from children;
if you punish them with the rod, they will not die.
Punish them with the rod
and save them from death.
A rod and a reprimand impart wisdom,
but children left to themselves disgrace their mother.
Most people use the old “save the rod spare the child” axiom out of context and in the completely incorrect manner. I like the version you quote because it is much more direct!