in reply to Sorting dates and times

Use Date::Calc qw(Delta_Days).

I guess a pretty inefficient method would be to grab the 1st day, plop it into an array, grab the next day, iterate thru' the array using Delta_Days to determine if it would be above/behind below/infront (depending on your orientation) of the date your comparing it to.

I'm not an expert on sorting algorithms, but using brute force would certianly work.

Just having a quick think about it, you could convert the date to a julianformat then use the regular perl sort function, and wah-lah there you have it, sorted dates.

Of course that wouldnt work for cross year boundaries, where you could convert the time to seconds (with thanks to merlyn).

If you're using a database somewhere in the mix, then you could just pump all your data into it, then extract it, sorted by date.