Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: IP list generation

by CiceroLove (Monk)
on Feb 16, 2001 at 22:45 UTC ( #58927=note: print w/replies, xml ) Need Help??


in reply to IP list generation

Without sitting down to write the code, I would approach this from a piece environment. I would just split(/./,$IP,4) and then calculate the differences between each octet of the two IPS and then multiply to find the number of IPs generated. Something like:
$OctDifference1*($OctDifference2*($OctDifference3*$OctDifference4));
Also I would increment the octets spearately and then cat them together.
HTH
CiceroLove

UPDATE:Or you could be much more elegant and faster like Randall was whilst I was typing my crummy response. :O)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2021-06-25 04:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (133 votes). Check out past polls.

    Notices?