I know, but the example had zero-padded fixed-width integer identifiers, which suggested that the numbers were always fixed width. I thought about a Schwartzian transform at first (like
flounder99 did in
Re: substr sort ??), but decided it was overkill and due to the multiple mappings slower than the direct comparison approach. If the identifiers were integers with different numbers of digits, though, my code wouldn't work, as you pointed out.