Last week the House narrowly defeated a state budget amendment that would have required proof of legal status to be eligible for a broad swath of public benefits. Angry voters clogged the Web, demanding the heads of those 82 state representatives who voted against the measure.

Actually, the 82 only voted for further study of the issue — usually a death knell for legislation but not such a bad idea in this case. Even the amendment’s sponsor, Representative Jeff Perry of Sandwich, admitted during debate that he didn’t know whether applicants for public housing, for example, needed to prove their citizenship.

(For the record, they don’t, under a 1977 federal consent decree in Weeks v. Public Housing Authority of Waltham. Judge Frank H. Freedman ruled that an alien status test for public housing violated the equal protection clause of the US Constitution. The ruling does not apply to other benefits.)

Perry, a Republican, is running for Congress, and critics called the amendment a grandstand play. But Perry also offered the measure last year, and the fact that it garnered more support this time — including from 59 Democrats — caught the attention of The New York Times, which featured it as an example of how “the heat from Arizona’s new immigration law burns far from its borders.’’

On Tuesday, gubernatorial candidate Charles Baker announced he could save the state $10 million to $25 million by requiring applicants for all benefits to prove their legal status. Baker stoutly insisted his “show me your papers’’ rule would apply to any social service agency that receives state funds. So I asked Baker at his press conference: if a homeless person comes to the Pine Street Inn, would he be required to prove his legal status to get a bed? “We should require it for everything,’’ Baker said.

Now Baker is saying this gaffe was misinterpreted, and that he intended his plan to model Perry’s, which makes certain exceptions for emergency care. But what part of “everything’’ does he not understand?

Baker and Perry want the state to clear applicants for public benefits through a federal database. In fact, the state Department of Transitional Assistance already uses the Systematic Alien Verification for Entitlements (SAVE) database, according to commissioner Julia Kehoe. “No illegal immigrant is eligible to receive cash assistance or SNAP’’ — the acronym for food stamps — she says.

Still, confusion over the current rules is understandable. Under a 1997 state law passed in response to President Clinton’s welfare reform, state agencies may adopt different policies, and many do. It’s one more reason a legislative study — a thorough and independent study —of Perry’s amendment makes sense.

It’s undeniable that the Arizona law has set off a contagion of tough responses to immigration in other states. But even last year, the National Conference of State Legislatures reported that a record 1,500 immigration bills were considered in all 50 states. It’s a clear reflection of local frustration with federal paralysis on comprehensive immigration reform.