my $distance = distance($zipcood, $hStoreLatitude, $hStoreLongitude "M"); if ($distance < $selectmiles) { $match = 1 ... }