It clearly does not work and is not appropriate.
It did when I went to school. It was a deterrent.
It can work. In some kids. But sometimes, the teacher bashing the kid's knuckles with the ruler did nothing but confuse him. That was before we knew about ADHD, learning disabilities and so forth.
The other problem comes with administration of the punishment. I got into a fight with one of our high school's football players. I was in 9th grade, he in the 11th. A teacher caught us fighting and sent us to the principal. He was about to whallop both of us with a paddle (standard for fighting) when the coach strutted in.
I got it. Football boy didn't. I was seriously pissed off. My folks were old school -- they were just upset at me, cause they couldn't control the school or someone else's kid. (I didn't understand that then, but now that I am a parent, I do.)
Bottom line, I kept fighting. But after school...off school grounds. So it kinda worked.
Learn to pick your fights better.