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