in reply to flat earth distance

Does Geo::Distance do what you are looking for?