Pharmacy benefits manager Express Scripts (NASDAQ:ESRX) may not have grown the top line by much in the second quarter, but using more generic drugs sure had a positive effect on the bottom line.

Revenue was up just 2.9% for the quarter, but it's the various profit lines that investors should really care about. Generic drugs are cheaper, so they don't add as much to revenue as branded drugs, but generics often sport higher gross margins. By increasing the number of prescriptions filled with generics to 65.9%, up 480 basis points, Express Scripts was able to increase its gross profit by 15%. This helped boost operating profit by 20%.

Finally, at the bottom of the income statement, thanks in part to lower interest expenses, net income improved 24.6%. And with a 5.6% decrease in shares outstanding from recent stock repurchases, diluted earnings per share jumped more than 31% to $0.75.

That's far from generic growth -- especially in this market.

Looking at those stock repurchases, Express Scripts bought back $373 million worth -- about 5.3 million shares -- in the most recent quarter. Even though the company is pumping out the cash flow, not every penny can be reinvested back into the company to try to stay ahead of rival Medco Health Solutions (NYSE:MHS). However, I'm not sure if repurchasing stock while it flirted with new 52-week highs was the best use of that cash. Hopefully, management was buying on the dips. Otherwise, paying down more of the $1.76 billion in debt the company started the year with -- more, at least, than the $160 million it did pay down -- might have been a better allocation of resources.

Given all that, I like the long-term growth prospects for pharmacy benefits managers in general. Quite a few blockbuster drugs have already gone off patent this year. Merck's (NYSE:MRK) Fosamax and Johnson & Johnson's (NYSE:JNJ) Risperdal both come to mind. And the generic options are only going to get bigger until the big kahuna -- generic versions of Pfizer's (NYSE:PFE) Lipitor -- hits the shelves in 2011.

Combine the higher margins these companies earn on those generics with the fact that higher gas prices should be an incentive for customers to take advantage of the home-delivery option, and pharmacy benefits managers like Express Scripts look to have a winning combination for steady growth.

Medco Health Solutions is a Motley Fool Stock Advisor recommendation. Let Fool co-founders David and Tom Gardner show you their top stock picks absolutely free with a 30-day trial. 

Fool contributor Brian Orelli, Ph.D., doesn't own shares of any company mentioned in this article. Pfizer and Johnson & Johnson are Income Investor selections. Pfizer is also an Inside Value pick. Try any of our Foolish newsletters today, free for 30 days. The Fool has a disclosure policy.