in reply to Date displaying the 0's

use POSIX 'strftime'; my $date = strftime '%Y-%m-%d', localtime;