use POSIX qw(strftime); $time = time(); print strftime("%m/%d/%Y %H:%M:%S",localtime($time));