mrbbq has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, I’ll have a txt file that has a bunch of networks on it with different /’s denoting /26 or /29, and I need it to put out every IP address in there. Is there an easy way to do this? Thanks.

Replies are listed 'Best First'.
Re: Has this been written before
by Fletch (Bishop) on Dec 08, 2005 at 18:46 UTC

    Net::Netmask; search.cpan.org is your friend. Learn it. Live it.

    Useless factoid update this is my 1600th post to PM. Fwee.

Re: Has this been written before
by tirwhan (Abbot) on Dec 08, 2005 at 18:52 UTC

    You may want to look at Net::CIDR and/or Net::Netmask.


    Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan
    A reply falls below the community's threshold of quality. You may see it by logging in.