in reply to Missing Something

All seems fine to me, just one thought: unless you really want machine-readable dates, it's much simpler to use

scalar localtime;

which pretty-prints a date for you, than doing all that stuff with $month+=1900; $year++ (or is it the other way round ;-)

dave