Food prices are rising worldwide. Some nations, such as Egypt and Cameroon, are facing riots as the prices for basic food stuffs rise. Other countries from India to Cambodia have banned food exports to try and keep prices low and reduce voter anger.

In the U.S., the Wall Street Journal last week gave advice normally associated with survivalists warning about the end of civilization. Readers were warned to start hoarding non-perishables ("Dried pasta, rice, cereals, and cans of everything from tuna fish to fruit and vegetables").

But in case anyone missed the seriousness of the message, the Journal went so far as to give the extra advice that: "You should also save money by buying them in bulk."

Not all food prices are soaring, however. Food and beverages as a group aren’t rising much faster than overall inflation. Inflation over the last year was slightly under 4 percent, with food and beverages at 4.4 percent.

But while some food prices have gone down (e.g., oranges and lettuce), others have gone up much faster, particularly grains and the meat from livestock fed on grains. Over the last year, eggs have gone up 35 percent, chicken 10 percent, beef 8 percent, white bread 16 percent.

Corn has experienced the most phenomenal rise. Corn, which averaged around $2 a bushel from 2002 to 2006, rose to over $4 per bushel in 2007 and is now over $6 per bushel.

This rise in food prices is primarily due to government ethanol mandates, particularly last year’s Energy Independence and Security Act. In 2006, 25 percent of all the corn used in the U.S. went to producing ethanol. This year the share rises to about 34 percent, and by 2014 the mandates are expected to raise the share to 53 percent.

The U.S. has long been a major exporter of grains, but the quantity going to ethanol are enormous. We are expected this year to convert 3.53 billion bushels of corn into ethanol. There are about 280 medium length ears of corn in a bushel. To put it differently, just the corn used to produce ethanol this year could provide 104 million people with 2,000 calories every day for a year.

Not that anyone would want to live on a diet of corn, but it gives an idea of how much hunger could be ended if the corn were used differently. While corn is the main source of ethanol in the U.S., other crops from sugar cane to wheat straw to rice are also being used to produce ethanol. Higher prices surely encourages more corn to be planted, but it means less of other crops, such as soybeans and wheat, driving up their prices.

People are beginning to understand this.

On Friday, Texas Governor Rick Perry became the first governor to ask the federal government to waive half the mandate that ethanol be made from grain.

The irony is how much worse off ethanol is making us in other ways. In recent years, without the subsidies and the mandates, there would have been little if any demand for ethanol. Besides a 51 cent per gallon tax credit, there are other incentives for farmers and small ethanol producers, all together totaling about $1 per gallon.

Ethanol also produces much less energy than gasoline. A car that gets 30 miles per gallon on gas would get only 20 miles per gallon on ethanol. Without the subsidies and the mandates, ethanol would have to be less than two thirds the price of gas before it would pay for people to use it.

Some have claimed that the price of corn has soared because gasoline is more expensive, but it is very hard to see much of relationship between changes in retail gas and corn prices. Retail gas prices average close to $3 a gallon in July and August 2006, but corn prices were still only about $2.50 per bushel. At the same time last summer, gas prices ranged from $2.70 to $2.80 per gallon and corn prices were well over $3 per bushel.

Environmental regulations are bad enough when they simply do nothing more than waste Americans’ money. But we live in a world economy and using massive amounts of corn and grain to make ethanol means that poor people from Africa to Bangladesh have less to eat.

John Lott is the author of Freedomnomics and a senior research scientist at the University of Maryland.