in reply to How do you sort a hash of array refs?

Try this:
my @sorted = sort { $hash{SIZE}[$a] <=> $hash{SIZE}[$b] } 0..$#{$hash{ +SIZE}}; $hash{$_} = [ @{$hash{$_}}[@sorted] ] for keys %hash;

Replies are listed 'Best First'.
Re: How do you sort a hash of array refs?
by Dominus (Parson) on Nov 16, 2000 at 05:22 UTC
    The original author may want to have a look at The indirect Sort. This is the technique that runrig demonstrated. The page linked above shows the same technique with a simpler example and a little more explanation.

Re: Re: How do you sort a hash of array refs?
by el-moe (Scribe) on Nov 16, 2000 at 05:32 UTC
    Thanks runrig. I see what you're doing now. I tested it on my system and it's going to work.