in reply to Boolean logic with IP addresses
unpack "I", pack "C4", split /\./, '255.255.240.0'; [download]
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...