in reply to Sorting Outline Numbers
It turns "4.2.1" into a three-byte string made of characters \x04, \x02, and \x01. It compares the outline numbers as strings of this form, and then expands them back to their numeral form.my @sorted = map join(".", map ord, split //), sort map join("", map chr, split /\./), @data;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sorting Outline Numbers
by hv (Prior) on Aug 11, 2005 at 01:52 UTC | |
by japhy (Canon) on Aug 11, 2005 at 12:25 UTC | |
|
Re^2: Sorting Outline Numbers
by salva (Canon) on Aug 11, 2005 at 12:42 UTC | |
by japhy (Canon) on Aug 11, 2005 at 14:19 UTC | |
by salva (Canon) on Aug 11, 2005 at 14:31 UTC |