use POSIX 'strftime'; my $date = lc strftime("%d%b%y:%H:%M:%S", localtime); # %b returns Mmm, not mmm