Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Sorting a HoH by values of the nested hashes

by Anonymous Monk
on Nov 20, 2013 at 12:34 UTC ( [id://1063510] : note . print w/replies, xml ) Need Help??


in reply to Sorting a HoH by values of the nested hashes

http://learn.perl.org/faq/perlfaq4.html#How-do-I-sort-an-array-by-anything-, http://perldoc.perl.org/perlfaq4.html#How-do-I-sort-an-array-by-%28anything%29%3f

push @entries, [ $sprintfed, $conn{$ip}{$port} ]; @entries = sort { $$a[1] <=> $$b[1] } @entries; @entries = map { $$_[0] } @entries; print @entries;
Understanding the Schwartzian transform.