in reply to Sorting Dates Issue

In your subroutine, you have $c <=> $d;. However, I don't see $d being declared or defined anywhere. I haven't tested your code, but this line looks like a good candidate for causing problems.

Also, you should change user strict; to use strict;, which I believe would have prevented you from using variables in your subroutine without using my or our. (see docs on strict)