Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: ip address calculations

by ariels (Curate)
on May 06, 2002 at 11:45 UTC ( [id://164285]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my ($s,$e) = unpack 'N2',1.2.3.4 . 1.2.4.2;
    printf("%vd\n",pack 'N',$_) for ($s..$e)
    
  2. or download this
    sub ip_to_num {
      my $ip = shift;
    ...
      $n = $n*256+$_ for (split /\./,$ip);
      $n
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-24 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found