in reply to Re: sorting a split hash
in thread sorting a split hash

As long as we have the nit combs out, and while coldfingers forgot to mention it, you might want to add a specific ordering for the keys if their values happen to have the same timestamp
sort { $b->[1] <=> $a->[1] || $a->[0] cmp $b->[0] }
coldfingers will have to decide whether they want to swap the $a and $b, now that sulfericacid has mentioned it matters. Oh, and I really think that should be a <=> first as the value returned from str2time (thank you for pointing it out!) seems to be a number. Don't want any problems with dates before September 2001.