Operating income increased $4.7 million to $21.7 million for the second quarter of fiscal 2012, compared to $17.0 million for the corresponding thirteen week period of fiscal 2011. Operating income as a percentage of sales for the second quarter of fiscal 2012 increased 40 basis points to 6.9%, compared to 6.5% for the corresponding period of fiscal 2011, including the approximately 50 basis point negative impact of the Company's public offering of common stock, incremental public company costs primarily related to share-based compensation expense and incremental net settlement payments made and received in connection with two legal matters. For the first half of fiscal 2012, operating income increased $13.7 million to $52.8 million, compared to $39.1 million in the corresponding twenty-six week period for fiscal 2011. As a percentage of sales, our operating margin increased by 80 basis points to 8.3% for the first half of fiscal 2012, compared to an operating margin of 7.5% for the corresponding period in fiscal 2011. The primary drivers of the increase in operating margin for the first half of fiscal 2012 were the increase in gross margin rate and a year-over-year decrease of transaction expenses incurred in connection with our public offerings of common stock, off-set by higher corporate expenses.
Balance Sheet/Cash Flow
During the second quarter of fiscal 2012, the Company generated $17.3 million in cash flow from operations and invested $24.8 million in capital expenditures, of which $23.3 million related to new, relocated and remodeled stores. For the year to date fiscal 2012 period, the Company generated $52.9 million in cash flow from operations and invested $41.9 million in capital expenditures, with $37.5 million spent on real estate activities.
The Company's cash balance as of July 29, 2012 was approximately $11.1 million which was relatively flat compared to the cash balance as of January 29, 2012. Total debt as of July 29, 2012 was $46.3 million, down $17.7 million from a balance of $64.0 million as of January 29, 2012.