in reply to Sorting hash on deep value
does not compute
I'm afraid that this just doesn't suffice as a description of the problem. You would not accept this from one of your users so please take a moment to understand why it does you no favours here.
Here is the SSCCE illustrating that LanX is probably right.
#!/usr/bin/env perl use strict; use warnings; use Test::More tests => 1; my %records = ( 123 => { Meta => { Name => 'Bob' } }, 124 => { Meta => { Name => 'Alice' } }, 125 => { Meta => { Name => 'Eve' } } ); my @sortedkeys = sort { $records{$a}{Meta}{Name} cmp $records{$b}{Meta +}{Name} } keys %records; is_deeply \@sortedkeys, [124, 123, 125], 'Sorted by name';
|
|---|