-
$formatted = sprintf '%.02d.%.02d.%.02d', $mon, $day, $yr
assuming you've already adjusted for $mon counting from zero
- You could convert back to seconds using timelocal and see if there's more than 24*60*60*7 seconds' difference.
The PerlMonk tr/// Advocate