Sorting a hash by value
If the comparison block for sort takes only one parameter, it returns the value to be compared
%h.sort( { $^a.key } ); # sort hash by keys %h.sort( { $^a.value } ); # sort hash by value @list.sort( { $^a.name } ); # sort @list by .name of each element
A block with no explicit parameters has $_ as an implicit parameter
%h.sort( { $_.value } ); # sort hash by value %h.sort( { .value } ); # use implicit $_