It was the brain fart heard 'round the world. At last night's Republican presidential debate, tough-talkin' candidate Rick Perry geared up to deliver a doozy of a proposal: The three government agencies that he would cut if he were President.

He named the first two with ease, but then it happened. "The third agency of government I would... I would do away with, the education, uh the... uh commerce... and, let's see. I can't. The third one, I can't. Sorry. Oops," he said in a brain-freeze fluster, which lasted a grueling 50 seconds.

In the heated race for the Republican nomination, this meltdown gave critics some pretty powerful ammunition (not to mention sparked a media firestorm), but Perry tried to maintain his cool. "I'm glad I had my boots on because I really stepped in it tonight," he quipped after the debate.

What does this have to do with business? Quite a bit.

"Presenting in front of people, whether it's 5 or 500, is definitely an art," says communications coach Carmine Gallo. "Make no mistake, there is a difference between knowing your material and knowing how to present it to buyers or competitors."

So whether it's a quick meeting with buyer at Starbucks or a pitch meeting in front of 10 executives, here's how to avoid the mental meltdownand what to do if it happens anyway.

1. Rehearse, rehearse, rehearse. "There was a guy named Steve Jobs who always rehearsed his presentations," says Gallo. "He knew every font on every slide and every detail of everything. And I'd say he nailed his presentations, wouldn't you?"

And don't just rehearse in front of the mirror. Do it in front of real people (friends, family, co-workers) before stepping foot in the spotlight.

Scott Stratten, marketing consultant and author of Un-Marketing, also suggests avoiding the impulse to "wing it". 

"Reading the slides in the car ride over, won't cut it," he adds. "You can't wing a presentation-- a good presentation, that is."

2. Break down your topic into manageable categories. "I typically train CEO's to answer questions by mastering categories," Gallo says. "Why? Because even in an unpredictable live setting, most questions will fall into one category. And practicing seven categories is much easier than trying to prepare for hundreds of questions."

Example: If you're asked by a buyer why your prices are higher than a competitor, Gallo's method would have you prepared to answer about prices in general.

"You would say something about why your prices are what they are. It's an indirect answer, but it's just as effective and looks like you are really prepared," he adds.

3. Never, ever "list" what you are going to talk about. "Perry's first mistake was saying 'three things'. He set himself up for failure," says Gallo. "If he had said, 'I've got a list of agencies I'd cut...' and just named two, no one would have known he forgot."

Though Gallo does train business people to memorize points in list form, he suggests if you are feeling uncomfortable with the topic when you're on the spot, just omit the number all together.

4. Get sleep, eat well, and exercise. Sounds pretty basic, but Gallo says all of the successful speakers he uses as examples in training are fit as fiddles.

"Joel Osteen, the spiritual speaker, is a huge fitness buff," he adds. "He is always on point with his presentations."

A blogger pointed out that Perry seems to lose steam at about the same time in every debate. Gallo suggests eating well before a presentation and getting plenty of sleep the night before to prevent killer brain farts.

But, as much as you prepare, you are human. So after you've stepped in it, here's how to minimize the damage.

1. Get over yourself. Fast. "Humor in these situations goes a long way," says Gallo. Perry's post-debate quip was, he adds, a good move.

"I applaud him for thinking quick on this," adds Stratten. "There wasn't any time for him to meet with advisors and plan a strategy to spin this. It's good to remember humor is the best and quickest way to move on and focus on something else."

Stratten also says that with social media and the internet providing a 24-hour news cycle, speed is of the essence.

"If you mess up, it's not don't hide, it's you can't hide," he says.

2. If you don't have to draw attention to it, don't. "If you're showing a slide where a map should have been, don't tell everyone something's missing. They can't miss what they don't know," says Gallo. "It's a basic principle of good presentation that is often forgotten in the stress of the moment."

3. Remember, a major mistake can actually boost your image.... if handled properly. Stratten recalls an example from the Red Cross. In February, an employee accidentally tweeted a, er, personal message from the Red Cross account that read: "Ryan found two more bottle packs of Dogfish Head's Midas Touch beer...when we drink we do it right #gettingslizzerd." Gulp.

The Red Cross then sent out this tweet: "We've deleted the rogue tweet but rest assured the Red Cross is sober and we've confiscated the keys."

"This is a great example of someone coming out on top of a major mistake," Stratten adds. "If the Red Cross can recover from a drunk tweet, a small business owner making a mistake in a big presentation and admitting fault, can actually be seen as an opportunity to be human."