print OUT scalar localtime,"\n"; #### #!/usr/bin/perl use strict; use warnings; use Time::HiRes qw( time ); open OUT, ">>timelog" or die "Can't open time log.\n$!"; my $hightime = time; my $timestamp = localtime $hightime; my $msec = substr $hightime - int $hightime, 1; $timestamp =~ s/(:\d+)\s/$1$msec /; print OUT $timestamp, "\n"; close OUT;