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;
In reply to Re^3: Notation of sort function
by Alphaphi
in thread Notation of sort function
by Alphaphi
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |