pike@RE_QUERY = sort { for my $i (3, 2) { return $QUERY{$a}[$i] cmp $QUERY{$b}[$i] if defined $QUERY{$a}[$i] && defined $QUERY{$b}[$i] && $QUERY{$a}[$i] cmp $QUERY{$b}[$i]; } return $QUERY{$a}[0] cmp $QUERY{$b}[0]; } keys % QUERY;
In reply to Re: Sorting a Hash by the presence of a $tring Argument
by pike
in thread Sorting a Hash by the presence of a $tring Argument
by Gerryjun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |