http://www.perlmonks.org?node_id=26039


in reply to Sorting a list of IP addresses (aka Why I hate Big O)

I'd try another solution :)
why not to read all IP adresses, convert them to binary,
for each part do:
join "", unpack "B8", pack "I" , $value;

, getting rid of '.' (couse now they play no role)
write these adresses to a txt file and then sort them execing external 'sort'?
Then convert them back to decimal , '.'-separated.. and voi la...
I havent tested that, but it seems to me it'll be quicker.

/Maqs.