in reply to sub-sorting a hash
my @sort_keys = qw(director title id type); use List::Util 'first'; sort { first {$a->{$_} cmp $b->{$_}} @sort_keys } @recs;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: sub-sorting a hash
by salva (Canon) on Apr 26, 2006 at 15:58 UTC |