in reply to Sorting Dates Issue

You claim this is your code:
use strict; ... sub compare { $a =~ /(\d{2})\/(\d{2})\/(\d{4})/; $c = $3 . $1 . $2; $b =~ /(\d{2})\/(\d{2})\/(\d{4})/; $c = $3 . $1 . $2; $c <=> $d; }
However there are no default variables $c or $d so your code would not run.

The fact that you assign the two compound numbers to the same variable may be your issue, use warnings; would have noted this.

print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."