in reply to short sorts
The last condition is not needed here: if you can get to the line, $type must be false. Otherwise, you would have returned already.return $sorts{$type}->($a,$b) if $type; my $random_sort = (keys %sorts)[rand (keys %sorts)]; return $sorts{$random_sort}->($a,$b) if !$type;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: short sorts
by Lady_Aleena (Priest) on Mar 30, 2012 at 17:23 UTC |