Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: Notation of sort function

by ikegami (Patriarch)
on Oct 27, 2023 at 19:11 UTC ( [id://11155229] : note . print w/replies, xml ) Need Help??


in reply to Re^3: Notation of sort function
in thread Notation of sort function

use Sort::Key qw( nkeysort ); my @sorted = nkeysort { $apples{ $_ }{ weight } * ( $apples{ $_ }{ golden } ? 10 : 1 ) } keys( %apples );