use POSIX 'strftime'; print 'The current date is '; print strftime('%Y-%m-%d', localtime), "\n";