No need for the date calculation, the -M operator already does that for you:
print "Old\n" if -M $temp1 > 3; [download]
In reply to Re^3: older files by derby in thread older files by Selvakumar