use Time::HiRes qw(time);use POSIX qw(strftime);my $t = time;my $date = strftime "%Y%m%d %H:%M:%S", localtime $t;$date .= sprintf ".%03d", ($t-int($t))*1000; # without roundingprint $date, " ";# cat > ttt.pl# perl ttt.pl