punish by

punish someone by something

to discipline someone by doing something. The headmaster punished the children by forcing them to go to bed early. She punished herself by not eating.
See also: punish