http://qs321.pair.com?node_id=268565


in reply to Sorting hash keys according to different criteria

If you want to put them in order (Jan, Feb, Mar...) you're going to have to tell it what that order is somewhere. I'd have an array:

@months = qw(January February March ... );

Then to access the months in order do

foreach my $month {@months} { print "$month has $days{$month} days\n"; }