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;
In reply to Re: short sorts
by choroba
in thread short sorts
by Lady_Aleena
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |