in reply to Boolean logic with IP addresses

This will give you a 32bit int:
unpack "I", pack "C4", split /\./, '255.255.240.0';

Replies are listed 'Best First'.
Re: Re: Boolean logic with IP addresses
by RatArsed (Monk) on Jun 05, 2001 at 12:52 UTC
    That's the one I'd seen before, and was trying to remember :o)

    As a caveat, the byte order on some processors means that this doesn't generate platform independent ints, but they're good enough for what I needed -- thanks...