The latest Republican debate in the race for the White House was the right tonic for Herman Cain, as he brushed aside allegations of sexual misconduct and repeatedly emphasized his “9-9-9” plan, while Texas Gov. Rick Perry had what one might call a debate nightmare.

Cain got the first question of the night on economic issues, but soon enough, CNBC’s Maria Bartiromo found a way to ask him about charges leveled against him, which brought boos and catcalls from the debate audience.

“Why should the American people hire a president if they feel there are character issues? “ asked Bartiromo.

Cain seemed ready.

“The American people deserve better than someone being tried in the court of public opinion based on unfounded accusations,” Cain said to loud applause.

“And I value my character and my integrity more than anything else. And for every -- one person that comes forward with a false accusation, there are probably -- there are thousands who would say none of that sort of activity ever came from Herman Cain,” he added.

CNBC’s moderators took even more flak after that, as John Harwood tried to turn the question to Mitt Romney, drawing even more boos and yells from the crowd.

“Would you keep a CEO -- are you persuaded by what Mr. Cain has said? Would you keep him on if you bought his company?” Harwood asked.

“Look, look, Herman Cain is the person to respond to these questions. He just did. The people in this room and across the country can make their own assessment. I'm not,” said Romney to applause.

Once again in this debate, Romney skated around potential trouble spots and let others make the headlines. Maybe his most memorable line will be when he defended himself against charges that he is a flip flopper.

“People understand I'm a man of steadiness and constancy,” said Romney.

As for Rick Perry, this debate will be remembered for one thing – and one thing negative only – as he had what many might call a brain fart. All of us do that from time to time, when you just can’t remember something.

Except our moments of forgetfulness usually do not occur on national television.

Perry was giving an answer about how he would cut the budget, when he decided to remind the debate audience that he wants to eliminate three different federal government cabinet agencies.

"And I will tell you, it is three agencies of government when I get there that are gone. Commerce, Education, and the -- what's the third one there? Let's see,” said Perry, as laughter broke out.

With other candidates and even the moderators throwing out suggestions, the uncomfortable seconds ticked by for Perry.

“So, Commerce, Education, and the...”

“EPA?” someone suggested.

“EPA, there you go,” Perry said, as lots of people breathed a sigh of relief that it was over.

Or was it.

“Seriously, is the EPA the one you were talking about?” asked CNBC’s Harwood.

“No, sir, no, sir,” said Perry, still searching through his mental rolodex for the answer.

“But you can't -- but you can't name the third one?” asked Harwood.

“The third agency of government I would -- I would do away with, Education, the...

“Commerce,” someone chimed in.

“Commerce and, let's see. I can't. The third one, I can't,” said Perry. “Sorry. Oops.”

It had Saturday Night Live written all over it.

Fair or not, debates operate under weird rules for the candidates and the news media.

You get lots of press for stinging one-liners ("Well, there you go again"), sharp exchanges between candidates (Romney-Perry this year) and gaffes.

Just ask Gerald Ford about whether Poland was under Soviet domination.

This certainly wasn't as big of a blunder as that one in 1976, but it will certainly be fodder for SNL, John Stewart, Stephen Colbert and many others.

Could Rick Perry be on his way to becoming the 2012 version of another Texas Governor, John Connolly?

In 1980, Connolly raised over $10 million and won only one delegate to the Republican convention.