Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: ip address calculations

by ariels (Curate)
on May 06, 2002 at 11:45 UTC ( #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
Node Status?
node history
Node Type: note [id://164285]
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: (5)
As of 2019-10-19 16:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?