You could convert your dotted-quad IP-addresses to integers, so you can do some simple math with them:
if ( $ip =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ ) { $number = $1 >> 24 + $2 >> 16 + $3 >> 8 + $4 }
In reply to Re: Splitting IP ranges depending on overlap conditions
by eXile
in thread Splitting IP ranges depending on overlap conditions
by kamesh3183
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |