Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Quickly determine which IP range an IP belongs to.

by BrowserUk (Patriarch)
on Nov 30, 2010 at 10:07 UTC ( [id://874458]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    C:\test>echo 92.103.2.204 | 874413.pl
    92.103.2.204 allocated to user;552
    ...
    
    C:\test>echo 2.103.2.204 | 874413.pl
    1 lookups (0 found) in 0.008 seconds (0.008237/sec)
    
  2. or download this
    >perl -MList::Util=shuffle 
    -nE"chomp(@i=shuffle<>); say +(split':')[0] for @i[0..1e3];last" ips.t
    +xt 
    |874413.pl >nul
    1001 lookups (1001 found) in 0.456 seconds (0.000455/sec)
    
  3. or download this
    #! perl -slw
    use strict;
    ...
    my $taken = time() - $start;
    warn sprintf "%d lookups ($found found) in %.3f seconds (%.6f/sec)\n",
    + 
        $., $taken, $taken / $.;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-26 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found