The former Massachusetts governor criticized the Texas governor for saying Social Security was unconstitutional as a federal matter and ought to be handled by the states, a claim Romney denied.
"There's a Rick Perry out there that is saying -- and almost to quote, it says [in Perry's book "Fed Up!"] that the federal government shouldn't be in the pension business, that it's unconstitutional. Unconstitutional and it should be returned to the states," Romney said. "So you better find that Rick Perry and get him to stop saying that."
Perry countered: "This is not the first time that Mitt's been wrong on issues. We never said we are going to move this back to the states," explaining he actually said he would support a limited state role to manage retirement security for state employees.
He also said he would preserve Social Security for those on it or near retirement and fix it for younger workers.
Perry used the exchange to draw attention to Romney's healthcare plan in Massachusetts, which included a mandate similar to the national healthcare law President Barack Obama signed last year.
"As a matter of fact [in your] hard-copy book ["No Apologies"], you said it was exactly what the American people needed to have ... then in your paperback book, you took that line out," Perry said.
Romney retorted: "I actually wrote my book, and in my book I said no such thing."
"And it's fine for you to retreat from your own words in your own book, but please don't try and make me retreat from the words that I wrote in my book," Romney said.
Fox News, Google and the Republican Party of Florida were hosts of the Orange County Convention Center debate -- the second in 15 days in a state expected to play a significant role in determining who wins the GOP nomination.
The 2-hour event featured audience participation, including questions submitted through Google's YouTube.
The audience of 5,000 at times responded loudly -- and booed when a gay soldier serving in Iraq asked if the candidates would reinstate the newly repealed "don't ask, don't tell" policy banning gay service members from serving openly.
Besides Perry and Romney, hopefuls at the debate included Rep. Michele Bachmann of Minnesota, Rep. Ron Paul of Texas, former House speaker Newt Gingrich of Georgia, businessman Herman Cain, former Utah Gov. Jon Huntsman Jr., former Sen. Rick Santorum of Pennsylvania and former New Mexico Gov. Gary Johnson.
Johnson, excluded from the three earlier debates for having low poll numbers, drew applause with a line criticizing the Obama administration's economic plan.
"My next-door neighbor's two dogs have created more shovel-ready jobs than the president," Johnson said.
On immigration, Perry said he opposed trying to build a fence along the entire U.S.-Mexican border -- to which Santorum said of Perry was "soft on immigration" -- and defended giving children of illegal immigrants in-state college tuition.
"That just doesn't make sense to me," Romney said, noting illegal immigrants save as much as $22,000 a year in tuition breaks that out-of-state citizens don't get.
Perry said to boos from some in the audience: "If you say that we should not educate children that have come into our state for no other reason than they've been brought here by no fault of their own, I don't think you have a heart."
The next GOP debate is set for Oct. 11 in Hanover, N.H.
Senate Democrats to pull all-nighter on climate change
Dennis Rodman pledges to end trips to North Korea