In a recent journal entry, Leon talked about WWW::Gazetteer. I've just finished porting most of the script I wrote a few days before YAPC::Europe 2002 into WWW::Gazetteer::HeavensAbove. This module gives you access to the heavens-above.com city database.
The API is close to Leon's WWW::Gazetteer, though a little different (since most request return more than one city, I didn't see the point in using wantarray()). When a WWW::Gazetteer API is defined, I'll make the module follow it.
Well, I suppose that you now have to write