Dollar General posted a quarterly loss on Tuesday, hurt by costs for closing stores and writing off stale inventory.

The discount retailer, which has struggled with lackluster demand for clothing, said holiday-related sales were positive so far, although it remained cautious in its outlook in a "highly competitive retail environment."