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"; }
|
---|
In Section
Seekers of Perl Wisdom