in reply to Re: Re: Hash sorting
in thread Hash sorting

I often use this technique in small data-munging scripts. It is a fast variant of the Guttman Rosler Transform, and shares these limitations with GRT:

Replies are listed 'Best First'.
Re^4: Hash sorting (GRT)
by tye (Sage) on May 13, 2003 at 15:09 UTC

    Bah, those are easy to deal with in a GRT.

    For the first, instead of using sprintf "%05d", $int, you can use pack "N", $int (for any positive integers that fit in a long) or even sprintf "%02d-%d", length(0+$int), $int (for positive integers of 99 digits or fewer!).

    For the latter, ~ is very handy.

                    - tye