in reply to Sorting hash values
I'd like to see what Data::Dumper says is in your hash. What you have written has typos or is plain wrong. Just adding parentheses around the data yields a hash with only two keys. Do you mean to have an AoH? If so, enclose the sets of distinct data in curlies to get a hash ref in each slot and make the named structure an array. That will make the most sense for sorting, too.
Here's what I think you wanted,
Your bld_num fields were in danger of becoming deprecated v-strings, so I quoted them.my @fetch = ( { sse_date => 4934056723, bld_num => '7.3.998.0.0' }, { sse_date => 4934099999, bld_num => '7.3.1003.0.0' }, { sse_date => 4949999999, bld_num => '7.3.1089.0.0' }, # . . . etc. etc. ); my @sorted_fetch = sort { $b->{'sse_date'} <=> $a->{'sse_date') } @fetch;
After Compline,
Zaxo
|
|---|