in reply to Re^3: Notation of sort function
in thread Notation of sort function
There is:
use List::AllUtils qw( nsort_by ); my @sorted = nsort_by { $apples{$_}->{golden} ? $apples{$_}->{weight} * 10 : $apples{$_}->{weight} } keys %apples;
There is also a string compare version.
|
---|