print " \"\"
Listings Found In Radius ( $count )
\n"; $count = 0; open(FILE, "herbalarea.pl") || die "I can't open that because: $!\n"; while() { chop; @all = split(/\n/); foreach $line (@all) { local() = split(/ /, $line); $lat2 = $hStoreLatitude; $lon2 = $hStoreLongitude; $lat1 = $lat1a; $lon1 = $lon1a; # Notice the 90 - latitude: phi zero is at the North Pole. @L = (deg2rad($lat1), deg2rad(90 - $lon1)); @T = (deg2rad($lat2), deg2rad(90 - $lon2)); $km = great_circle_distance(@L, @T, 6378); if ($km < $distance) { $match = 1; $count ++; $area = ""; $area1 = ""; $area2 = ""; $rounded = sprintf("%.1f", $km); print "
Store # $area
\n"; print "
\n";