in reply to Re^3: Notation of sort functionin thread Notation of sort function
use Sort::Key qw( nkeysort ); my @sorted = nkeysort { $apples{ $_ }{ weight } * ( $apples{ $_ }{ golden } ? 10 : 1 ) } keys( %apples ); [download]