ryan has asked for the wisdom of the Perl Monks concerning the following question:
I have done it, but it is a terribly huge conditional looping structure with one or two holes.
ie: 10.0.70.1 -> 10.1.50.20 will produce a list of the 60436 IPs that are in this range (to my calculations). It doesn't need to store it, just dump it to the screen or a file.
It needs to accept ANY IP range (as long as the second one is larger than the first).
Also, I need to know the number of IPs that will be generated through a relatively simple calculation rather than running through the loop slowly implementing a counter. I've got lost in the number of conditions that exist.
Do any such scripts exist to anyone's knowledge, or can someone whip up an efficiently coded version?
Thanks
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: IP list generation
by merlyn (Sage) on Feb 16, 2001 at 22:40 UTC | |
by ryan (Pilgrim) on Feb 16, 2001 at 23:00 UTC | |
by $code or die (Deacon) on Apr 28, 2001 at 21:39 UTC | |
Re: IP list generation
by CiceroLove (Monk) on Feb 16, 2001 at 22:45 UTC |