#!/usr/bin/perl use strict; use warnings; use Geo::Distance; my $geo = Geo::Distance->new; for (qw/tv hsin polar cos gcd mt/) { $geo->formula($_); print $_, " ", $geo->distance('mile', 39.175555,-76.671388 => 33.942222,-118.407222), "\n"; } __DATA__ tv 9537.71241222878 hsin 2881.23714304656 polar 3114.47526297555 cos 2881.23714304656 gcd 12438.0476860875-9076.08896733252i mt 2881.23714304656