- or download this
my @sorted = sort { sprintf("%010d%s",$a,$a) cmp sprintf("%010d%s",$b,
+$b) } @array;
- or download this
my @sorted = sort { sprintf("%08d%s",99999999-$a,$a) cmp sprintf("%08d
+%s",99999999-$b,$b) } @array;
- or download this
my @sorted = sort { sprintf("%010u%s",-$a,$a) cmp sprintf("%010u%s",-$
+b,$b) } @array;