Walgreen (NYSE:WAG) and Wal-Mart (NYSE:WMT) are two of the best companies at what they do, even though they don't do exactly the same thing. And that's bad news for RiteAid (NYSE:RAD) -- it's tough enough to turn a business around, even more so when your competitors are sharp.

All the same, Rite Aid continues to try to fight the good fight -- looking to make its stores more attractive and continuing to build on its strengths in the generic drug dispensing business. To that end, this recent quarter wasn't so bad. Revenue was up a little less than 3%, though same-store sales came in at 3.6% as the pharmacy business did the best it has done in some time.

But higher sales aren't always a windfall. Gross margins actually fell a bit this quarter, and the company primarily blamed lower Medicare Part D reimbursement and a higher percentage of generics in the mix. Furthermore, adjusted EBITDA was still down by a double-digit amount as the company incurred higher occupancy and relocation expenses.

I do wonder what the future holds for pharmacies in general. After all, companies like WellPoint (NYSE:WLP) and Medco (NYSE:MHS) continue to push for mail-order drug delivery. What's more, increasing numbers of drug-takers accept this, either because they're familiar and comfortable with buying pharmaceuticals without the face-to-face interaction or because they have no choice in the matter. So might that mean that drugstores are going to face an inexorable decline in prescription sales and morph into quasi-grocery and personal goods stores?

Nimble investors have made some money in Rite Aid, and I suppose there's still the chance that the company will boost its performance to a level at which patient investors could make some money. But with so many other, better companies to invest in, is it really worth taking the chance?

For more Foolishness, but without the child-safety caps:

Wal-Mart is a Motley Fool Inside Value recommendation. Take the newsletter for a 30-day free trial.

Fool contributor Stephen Simpson has no financial interest in any stocks mentioned (that means he's neither long nor short the shares).