my $three_days = 86400 * 3; my $mtime = (stat $temp1)[9]; if (time - $mtime > $three_days) { print " OLDER 3 days"; }