The XML returned by this request is shown below. OK street_address 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA #### ****** START ****** START ****** START ****** START ****** START ****** START job no.: 1 Senior Implementation Specialist ==> Prof Svcs Boulogne-Billancourt, , France 48.8396952 2.2399123 job no.: 2 Marketing Manager ==> Marketing Vienna, Wien, Austria 48.2081743 16.3738189 job no.: 3 Solutions Architect - Consulting Architecture ==> Prof Svcs Boulogne-Billancourt, , France 48.8396952 2.2399123 job no.: 4 Lead Generation Specialist ==> Marketing Oceanport, New Jersey, United States 40.3181663 -74.0151382 job no.: 5 Facilities Supervisor ==> IT Oceanport, New Jersey, United States 40.3181663 -74.0151382 job no.: 8 Director, Channel Sales ==> Partners PO Box 502224, , United Arab Emirates 23.424076 53.847818 #### 306926-636 Enterprise Account Manager Remote, , Turkey 7/5/2014 306927-636 Solutions Architect - Consulting Architecture Remote, , Israel 7/5/2014 #### # having assigned the job title to a category, now try to lookup the # lat and long of the job position so we can plot in on a map. # turns out the Google API has a limit of 10 geocodes per second so we # need a loop to throttle the request rate. otherwise google throws an error # and I am not sure how to trap it. if ($loop < 10) { $geocoder = Geo::Coder::Google->new(apiver => 3); eval{ $latlong = $geocoder->geocode(location => $location); if ($1){ print "!!! !!! !!! --- Couldn't get location : $location --- !!! !!! !!!\n"; }else{ $map_coords = $latlong->{geometry}{location}{lat} . " " . $latlong->{geometry}{location}{lng}; print ( " job no.\: $job_count $job_title \=\=\> $department $location $map_coords \n" ); $loop++; } } } else { print ( " job no.\: $job_count $job_title \=\=\> $department $location $map_coords \n" ); $loop = 0; sleep 1; } # count up the jobs by category # if the category already exists in the hash table then increment it if (exists $categories{$department} ) { $categories{$department}++; } # otherwise add it and initialize the counter to '1'. else { $categories{$department} = 1; } # count up the jobs by city # if the location already exists in the hash table then increment it if (exists $offices{$map_coords} ) { $offices{$map_coords}++; } # otherwise add it and initialize the counter to '1'. else { $offices{$map_coords} = 1; $cities{$map_coords} = $location; } # need to loop through the offices hash and scale out the size of the dot print ($out_fh "$map_coords \"\" color=red symbolsize=", "$offices{$map_coords}", "\n"); print ($out_fh "$map_coords \"\" color=red symbolsize=", "$offices{$map_coords}" * "2", "\n \n"); } p %categories; p %offices; p %cities; close ($out_fh);