in reply to Representing a single-digit number as two-digits

Before you head down that road, have you tried the POSIX::strftime module/function yet? The strftime time & date conversion formats will handle anything you want to do with the date, without requiring you to reinvent the wheel... "%M" for example, is minute with leading 0s...
  • Comment on RE: Representing a single-digit number as two-digits