First you assume the date format he is using and then you go on to suggest a byzantine method of sorting dates in that format...
If his dates really are in a format like "DD.MM.YYYY" then Date::Calc is hardly necessary:
my @sorted = map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { [ $_, join "", reverse (split /\./) ] } @dates;
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: Sorting according to date
by sauoq
in thread Sorting according to date
by campbell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |