Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^3: ip range for config files

by ehdonhon (Curate)
on Nov 05, 2003 at 06:15 UTC ( #304641=note: print w/ replies, xml ) Need Help??

in reply to Re: Re: ip range for config files
in thread ip range for config files

The thing about - is that it is impossible to represent that exact range in one net block. You have to use several netblocks of varying sizes to do it. So no, Net::Netmask will not let you do it all in one block because its impossible.

It does, however, give you the range2cidrlist method that will break that range into a series of valid netblocks for you.

Comment on Re^3: ip range for config files
Replies are listed 'Best First'.
Re: Re^3: ip range for config files
by smackdab (Pilgrim) on Nov 05, 2003 at 07:14 UTC
    You know, I'll bet everyone using these modules wants the CIDR format...actually I don't. I want an array of individual IP addresses back from a CIDR format (or a IP-Range format)

    I want to give the user an option to specify a range of IP addresses in their favorite format and then get the array back...

    I am very likely very CONFUSED...

    Say I have a config file of hosts/devices to ping...

    # Ping me list
    host1;;; host2

    I am looking for a proper format to allow. right now, you have to list 1 IP or hostname on EACH line ;-(

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2015-11-27 03:58 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (717 votes), past polls