"perldoc DateTime" would have told you how to format milliseconds.
use DateTime;
use Time::HiRes qw(time);
my $dt = DateTime->from_epoch( epoch => time() );
print $dt->strftime('%Y-%m-%d %H-%M-%S-%3N'), "\n";
* sudo apt-get install libdatetime-perl
perl真麻烦