Struggling web giant Yahoo reported a $278 million loss during the final three months of 2008. That’s Yahoo’s first loss since 2002, and the first time its revenue has declined since the end of 2001, according to Digital Daily.

In the Sunnyvale, Calif. company’s announcement, new chief executive Carol Bartz (pictured) tries to find the silver lining, saying Yahoo’s cash flow was at the upper end of estimates released during Q4, and that Yahoo “also made important investments while aggressively managing costs, leaving us better positioned to weather the economic downturn and emerge stronger when advertiser spending improves.” Still, while others have written that Bartz is the right person to turn the company around, she clearly has her work cut out for her. Yahoo was already struggling before the economic downturn sent ad rates plummeting; the company’s Open Strategy initiative (which adds social networking components to Yahoo services and integrates them with third-party applications) probably won’t be enough on its own.

Despite the bad news, Yahoo actually beat analysts’ expectations. Excluding certain fees, Yahoo earned $238 million (17 cents per share) in non-GAAP income, while analysts had predicted 13 cents per share. Yahoo’s non-GAAP income for all of 2008 was $642 million (46 cents per share).

As of 2:35pm Pacific time, Yahoo shares were up more than 3 percent, to $11.69, in after-hours trading.