Well I've been looking at the documentation for the module
Math::Trig on CPAN — well, actually, it's a standard module — and it includes calculations related to "great circle distances". That's quite the opposite of what you want... but it might be a direction to look into.