my %mthSO = do { my $order; map { $_, ++ $order } qw{ ... }; };
...
$mthSO{ $a->[ 1 ] } cmp $mthSO{ $b->[ 1 ] }
Since month names are map-ped to numeric values, shouldn't the month name value comparison be numeric <=> rather than lexicographic? Adding the dates Jan14 Dec14 to the test set shows the problem.
In reply to Re^2: sorting keys in hash
by AnomalousMonk
in thread sorting keys in hash
by Perlseeker_1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |