in reply to date and time
I'd do that using the POSIX::strftime function. It saves you having to worry about issues like this.
use POSIX 'strftime'; my $date = strftime('%d-%m-%Y', localtime); print "$date\n"; [download]
Blessed Be The Pixel