Risk off! U.S. stocks opened lower this morning, with the benchmark S&P 500 and the narrower Dow Jones Industrial Average (^DJI 0.04%) down 0.88% and 0.99%, respectively, at 10:15 a.m. EST. This may have something to do with the fact that Russian soldiers have boots on the ground on Ukrainian soil in what appears to be a volatile, unpredictable situation. The Russian ruble fell to a record low against the dollar today and the RTS Cash Index of Russian stocks is down 12.5% as I type this. These are the sort of headlines that can cause many investors to act rashly and in a manner contrary to their long-term interests. Thankfully, Berkshire Hathaway(BRK.B 0.11%) CEO Warren Buffett, appearing on CNBC this morning, offered some much-needed perspective from someone who bought his first stock in 1942 ("I will tell you the macro factors were not looking good!"). He also provided his current thinking on some individual stocks, including PepsiCo (PEP 0.36%) and Coca-Cola (KO 0.95%).

Unruffled by the news out of Ukraine, Buffett is actually buying a stock this morning -- and he likes it better today than he did on Friday:

When I got up this morning, I actually looked at a stock on the computer that trades in London that we're buying and it's down and I felt good. ... It was an English stock. ... I had a price limit on it and we were buying it on Friday, but it's cheaper this morning and that's good news.

What of the potential threat of World War III or a return to the Cold War, countered CNBC's Becky Quick? Buffett responded:

If you tell me all of that's going to happen, I will still be buying the stock. You're going to invest your money in something over time. The one thing you can be quite sure of is if we went into some very major war, the value of money would go down -- that's happened in virtually every war that I'm aware of. The last thing you'd want to do is hold money during a war.

So if you don't want to hold cash, what do you want to own?

You might want to own a farm, you might want to own an apartment house, you might want to own securities. During World War II, the stock market advanced -- the stock market is going to advance over time. American businesses are going to be worth more money, dollars are going to be worth less, so that money won't buy you quite as much, but you're going to be a lot better off owning productive assets over the next 50 years, than you will be owning pieces of paper.

And speaking of an American business that has grown its intrinsic worth at an extraordinary rate over the past 50 years, one viewer asked Buffett if he was worried about Coca-Cola's moat declining in the near future? [Coca-Cola is one of Berkshire Hathaway's "Big Four" stock investments -- Buffett said it is very unlikely that he would sell it within the next five years.]

[Coca-Cola] is under a lot more pressure than it was 10 or 15 years ago, particularly in the United States, but their sales went up last year -- just as they go up almost every year -- in terms of unit cases of carbonated soft drinks. They're right now 3% of all the liquids people put in their mouths throughout the whole 7 billion people are Coca-Cola products and think maybe that 3% will go up a little over time. I think they've got wonderful brands and wonderful acceptance around the world; Coca-Cola brand itself sold 100 million more cases last year, as I remember, than the year before and it sold more that year than the year before. It's a very, very good business.

Buffett also had something to say about Coca-Cola competitor PepsiCo, which has been under pressure from activist investor Nelson Peltz to spin off its Frito-Lay snack business:

I don't think if I owned Pepsi -- if I was the only holder of it or my family was the only holder of it -- I don't think I'd split it up. I think that Frito-Lay is an extremely good business, it's a better business than the soft drink business, but I think the soft drink business is a good business, too and I don't see any reason to split them up.

Focus on high-quality businesses. Continue buying stocks when the macroeconomic environment looks gloomy. Take the long view. These are lessons that all investors ought to learn -- and relearn -- if they want to achieve long-term success.