use POSIX 'strftime'; print strftime ('%I:%M:%S %p - %a, %B %d, %Y', localtime (time)) . "\n";