in reply to Boolean logic with IP addresses

The method to use is thus :

IP a.b.c.d => convert to 32-bit int => d + (c * 256) + (b * 256 * 256) + (a * 256 * 256 *256) ----------------------- = 32-bit representation of IP Address.


This shouldn't be too hard to do in Perl, give me a bit of time to work it out :)

UPDATE: Nevermind, alfie's done it above.

Azatoth a.k.a Captain Whiplash

Make Your Die Messages Full of Wisdom!
Get YOUR PerlMonks Stagename here!
Want to speak like a Londoner?