in reply to Re^2: Notation of sort function
in thread Notation of sort function
Here I specify the calculation to be performed only once, and as a second parameter, I pass the operator.my @sorted = sort{ { $apples{$SORTVAR}->{golden} ? $apples{$SORTVAR}->{weight} * 10 : $apples{$SORTVAR}->{weight} }, '<=>' } keys %apples;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Notation of sort function
by tybalt89 (Monsignor) on Oct 27, 2023 at 18:56 UTC | |
Re^4: Notation of sort function
by kcott (Archbishop) on Oct 27, 2023 at 16:03 UTC | |
Re^4: Notation of sort function
by ikegami (Patriarch) on Oct 27, 2023 at 19:11 UTC |