ATLANTA - The shortage of skilled workers to build up U.S. infrastructure could be met if the government eased restrictions on immigration, former Federal Reserve Chairman Alan Greenspan said yesterday.

"We used to be a melting pot, but now seem to have some trouble with that," Greenspan said. "I think that's sad."

Greenspan said he believed the issue could be resolved with a "stroke of the pen," an apparent reference to action by Congress and the president.

Later yesterday, a bipartisan group of senators and the White House agreed on an immigration overhaul to grant quick legal status to millions of illegal immigrants already in the United States and fortify the border against new ones. That set the stage for a battle next week in the full Senate.

Greenspan said the immigration issue was "restricting the supply of a skill or all sorts of skills." He made the comments during a question-and-answer session at an event honoring Georgia business leaders.

He dodged the two biggest questions of the day: what does he think the economy will look like by next year's presidential election, and does he think the stock market has been too exuberant, given the rise in share prices despite tepid earnings at some major companies.

Greenspan reiterated prevailing sentiments about the housing-market slowdown and the impact of problems in the subprime-lending sector.

"We have got a continued period of significant weakness in new-home construction for a while," Greenspan said.

He said he could not predict when the cycle would end.

Greenspan, 81, started the Washington-based consulting firm Greenspan Associates L.L.C. when he stepped down as Fed chairman in 2006.

Even in semiretirement, he has the power to rattle investors. In late February, his comment that the U.S. economy had a one-third chance of slipping into recession was a factor behind a brief global stock sell-off.

Greenspan said that he had learned lately to be more careful about what he says, because, if he isn't, "the markets go berserk."