1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
use strict;
use Data::Dumper;
use Geo::Google;
#Allen's office
my $gonda_addr = '695 Charles E Young Dr S, Los Angeles, Los Angeles, California 90024, United States';
#Stan's Donuts
my $stans_addr = '10948 Weyburn Ave, Westwood, CA 90024';
#Roscoe's House of Chicken and Waffles
my $roscoes_addr = "5006 W Pico Blvd, Los Angeles, CA 90019";
#Instantiate a new Geo::Google object.
my $geo = Geo::Google->new();
#Create Geo::Google::Location objects. These contain
#latitude/longitude coordinates, along with a few other details
#about the locus.
my ( $gonda ) = $geo->location( address => $gonda_addr );
my ( $stans ) = $geo->location( address => $stans_addr );
my ( $roscoes ) = $geo->location( address => $roscoes_addr );
print $gonda->latitude, " / ", $gonda->longitude, "\n";
print $stans->latitude, " / ", $stans->longitude, "\n";
print $roscoes->latitude, " / ", $roscoes->longitude, "\n"; |
Partager