Aristotle++ has already answered your questions. However, I would like to point out that your code does not return anything when $hashMonth{$a} > $hashMonth{$b} -or- $hashMonth{$a} == $hashMonth{$b} and $hashDay{$a} >= $hashDay{$b}. You can fix this by removing the else block and just replacing it with return $b.
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
In reply to Re: Sorting Criteria
by antirice
in thread Sorting Criteria
by wizard341
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |