Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: Zipcode Proximity script

by fizbin (Chaplain)
on Apr 01, 2003 at 04:33 UTC ( #247145=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use constant EARTH_RADIUS => 3956;
    use constant PI           => 4 * atan2 1, 1;
    
    ...
      return sub { abs($lat - $_[0]) < $maxlatdiff and 
                   abs($long - $_[1]) < $maxlongdiff; }
    }
    
  2. or download this
    # zipcode, lat, long
    @data = (['00210', 43.00589, 71.0132], ['00211', 43.00589, 71.0132], .
    +..);
    
  3. or download this
    map { $_->[1] *= PI/180; $_->[2] *= PI / 180;} @data;
    
  4. or download this
    $distance = 25;
    
    for $i (0..$#data) {
    ...
        }
      }
    }
    
  5. or download this
    @distances = qw(5 10 25 50 100);
    @distfiles = map { "0-$_.txt" } @distances;
    
    ...
        }
      }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://247145]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2015-07-08 06:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls