my %cache = ();
my @sorted = sort {
$cache{$a} ||= pack('C4' => $a =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/);
$cache{$b} ||= pack('C4' => $b =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/);
$cache{$a} cmp $cache{$b};
} @unsorted;
In reply to Re: Ipsort
by dws
in thread Ipsort
by bent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |