use POSIX 'strftime'; my $datestring = strftime 'Today is %x.', localtime; print $datestring, $/;