Texas Gov. Rick Perry needed to show in tonight’s debate that he is presidential, substantive and ready for prime time. While he made no major gaffes, he certainly did not stand out in the crowd. He took hits on his views on Social Security and on mandatory HPV testing, and unsurprisingly did not have convincing comebacks. At times — on foreign policy and on global warming — he seemed to search for words. He will need to lose the frozen grin as well. His best moment came near the end of the debate when he gave a measured, tough-minded defense of Texas’s high rate of executions, explaining the circumstances under which you will pay “the ultimate penalty” in Texas.

Mitt Romney, Rick Santorum and Michele Bachmann turned in solid performances. Nevertheless, it was largely a Romney vs. Perry affair.

On a very red set, with Romney and Perry standing shoulder-to-shoulder, there was high drama. For the opening minutes, it was Romney and Perry one-on-one. Perry evaded questions on Texas’s shortcomings on health care and education and instead stressed his job record. Romney roared back defending his record in the private sector. He used humor to observe that, of course, Perry wouldn’t claim credit for the Texas governor inherited (no income tax, a Republican legislature, etc.). They exchanged barbs -- reminding the audience that Gov. Michael Dukakis and Gov. George W. Bush created more jobs than their competitor. Meanwhile, Romney’s ever-so-helpful campaign sent out an e-mail attesting to the job creation successes of Perry’s predecessors.

On health insurance, none of the candidates was pressed to explain their own ideas for replacing ObamaCare. Perry tried to blame the federal government for Texas’s record number of uninsured. (But why did 49 states do better than his?) Ron Paul later zinged Perry on his letter in support of HillaryCare. Perry’s response was to claim he was trying to help farmers, and, besides, he had no idea it would be a monstrosity. (Really?)

Perry was also hit hard by Paul and others for implementing mandatory HPV mandatory vaccinations, and doing so by executive order. Bachmann declared: “It’s parents who need to make the decisions.” Romney here played the elder statesman, suggesting Perry’s heart was in the right place. Even though he previously said the HPV mandate was a “mistake,” Perry seemed to defend his mandate, insisting there was an opt-out and that it was part of an anti-cancer measure: “At the end of the day, I will always err on the side of saving lives.” Santorum fired back, blasting Perry as well. “I would expect [a mandate] of President Obama,” he said, not of a conservative governor. Watch for that to make the ads in South Carolina and Iowa.

Perry was asked about his comments on Social Security in his book, “Fed Up.” He said that those near retirement would be safe, but that we need to figure out how to transition benefits to others. He repeated his claim that Social Security is a Ponzi scheme, but he didn’t offer his own plan. Rather than respond to a question about Karl Rove’s complaints about his rhetoric on Social Security, he snapped that “Karl has been over-the-top for a long time.” Not a good moment. Romney jumped on Perry’s comments, saying many depend on Social Security and that it wouldn’t be acceptable to destroy it. Perry didn’t actually respond, insisting that the status quo was unacceptable. (But what is his plan?)

Romney had his tough moments, as well. As best he could, he defended RomneyCare while pledging to repeal ObamaCare. His opponents took turns bashing the individual mandate. Once the debate moved on, he didn’t encounter any more tough moments.

Bachmann didn’t get her first question for nearly 15 minutes, responding with a punchy answer on the job-killing impact of ObamaCare. She was sharp enough to debunk the notion that an executive order can repeal ObamaCare, and she pledged to help to elect enough Republican senators to pass. She was measured and eloquent at times, whether criticizing HPV vaccinations or making an issue of the high rate of black unemployment. Still, she seemed to be less than central to the debate. Perry will need to truly stumble for her to get back into the chase.

Newt Gingrich came to Romney and Perry’s defense by refusing to tag either as possessing the better record on health care. He launched a tirade against the media and declared that what matters is the candidates’ agreement on repealing ObamaCare.

Santorum also turned in a strong performance, demonstrating his reform bona fides on welfare reform and bashing Perry on HPV testing.

On illegal immigration, Perry vouched for “boots on the ground.” Romney reeled off a list of measures he deemed a “magnet,” mentioning in-state tuition (a problem for Perry). Gingrich boldly stood up for comprehensive immigration reform (“We have to find a way to deal with people who are here.”). It was a moment of uncommon courage in a party that wants no part of such talk. Santorum said that “we’ll have that conversation” about legalizing immigrants who are here after we secure the border. At least the hot-button rhetoric from 2008 is largely gone.

Foreign policy received barely a mention. Jon Huntsman made his isolationist pitch. Perry was pressed on where he has seen “military interventionism.” He said it was a “philosophical” statement that we shouldn’t put troops at risk unless our national interests are at stake and we have a clear exit strategy. He did not specify how he would determine that and seemed less-than-comfortable answering the question. Bachmann chimed in with a clear denunciation of our involvement in Libya. Santorum ripped neo-isolationism, praising Ronald Reagan and decrying “exit strategies.”

On global warming, Perry seemed a bit wobbly as well, saying the science was not settled. He became hesitant as he tried to get out the idea that we shouldn’t put our economy in jeopardy. Huntsman, of course, accused the others of being scientific neanderthals.

Perry survived, but without erasing doubts about his candidacy. Potentially damaging traps were set on HPV testing, HillaryCare and Social Security. The debate was a bit of an equalizer, and may in fact help to remind voters of some of the other candidates. For Romney, he engaged with Perry cautiously, with his most effective moments being his skewering of Perry’s position on Social Security and his explanation of his private-sector experience at Bain. Contrary to the hysterics in the blogosphere, this race is far from over. In fact, I think they are just warming up.

More from PostOpinions on the GOP debate:

Milbank: Perry comes out fighting

Bernstein: Does it matter who won?

Thiessen: Perry’s narrow win

Marcus: Perry doubles down on Social Security

Gerson: Romney 1, Perry 0

Cohen: The debate’s winners and losers