SECAUCUS, N.J. (AP) — The Children's Place saw its second-quarter loss swell as the cost of sales and some charges countered revenue gains, but the performance topped Wall Street expectations.

The Secaucus, N.J., company said Thursday it lost nearly $18 million, or 74 cents per share, in the three months that ended July 28. That compares with a loss of $9.8 million, or 38 cents per share, in last year's quarter. The adjusted loss, which doesn't count one-time items, was 62 cents per share.

Revenue climbed 5 percent to $360.8 million.

Analysts surveyed by FactSet expected, on average, an adjusted loss of 66 cents per share on $353.4 million in revenue.

The Children's Place Retail Stores Inc. said it booked a $3.1 million charge in the quarter to leave a West Coast distribution center and $1.1 million for a legal settlement. The company's cost of sales climbed 8 percent to $246.6 million, while its selling, general and administrative expenses rose more than 7 percent to $120.3 million.

The company said it had solid sales growth in the quarter, and it expects to carry momentum into the back-to-school selling season. Revenue from stores open at least a year grew 3.4 percent, helped in part by U.S. and Canadian results and e-commerce sales. That's a key gauge of a retailer's health because it excludes volatility from stores recently opened or closed.

The Children's Place raised the low end of its fiscal 2012 earnings forecast. It now expects adjusted earnings to range between $3.20 and $3.30 per share. That compares with previous guidance for $3.15 to $3.30 per share.

Analysts expect, on average, $3.24 per share.

The Children's Place opened 19 stores and closed one to end the second quarter with 1,080 stores.