Created
May 29, 2009 08:40
-
-
Save MikeRalphson/119855 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($oi->{'type'} eq 'str') { | |
@projects = sort {$a->{$oi->{'key'}} cmp $b->{$oi->{'key'}}} @projects; | |
} else { | |
#@projects = sort {$a->{$oi->{'key'}} <=> $b->{$oi->{'key'}}} @projects; | |
@projects = sort {!$a->{$oi->{'key'}} ? 1 : !$b->{$oi->{'key'}} ? -1 : $a->{$oi->{'key'}} <=> $b->{$oi->{'key'}}} @projects; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment