in reply to Sort by string length

If your array is small, it doesn't matter how you sort. For large arrays, a GRT is fastest. For instance:
@elements = @elements [map +(unpack $format, $_) [-1], sort map pack ( +$format, length $elements [$_], $_), 0 .. $#elements];
And a GRT is far less memory hungry than an ST.