in reply to Sorting Criteria
The way to sort first by year, then month, then day,
though I haven't seen what the structure of your elements is. That might indicate another approach such as a Schwarzian Transfornm.sort { $hashYear{$a} <=> $hashYear{$b} or $hashMonth{$a} <=> $hashMonth{$b} or $hashDay{$a} <=> $hashDay{$a} } @unsorted;
After Compline,
Zaxo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Sorting Criteria
by wizard341 (Acolyte) on Aug 05, 2003 at 18:31 UTC |
In Section
Seekers of Perl Wisdom