in reply to Sorting a hash of IP addresses?

Or another solution with Schwartzian Transform: I can just give you a list of sorted keys:
my @sortedKeys = map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { [ $_, join("", # xx.XXX.xx.X => xxxXXXxxxXXX map { sprintf("%03d", $_) } ( /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/ ) ) ] } keys %hash;
But this solution might not be the fastest one :-)