in reply to Re: Sort by value - new twist
in thread Sort by value - new twist

Option 1 does it exactly!!!

Brilliant!

Replies are listed 'Best First'.
Re^3: Sort by value - new twist
by Limbic~Region (Chancellor) on Sep 01, 2004 at 22:07 UTC
    shemp,
    This is also how Tie::Hash::Sorted is able to dynamically change the sort routine. It can even sort via lexicals that the package normally wouldn't even be able to see via closures. If you could deal with your hash being tied, Tie::Hash::Sorted gives you the ability to define your sort routine at runtime for free.

    Cheers - L~R