in reply to printing date on a file

Time::HiRes provides a gettimeofday() function that returns the epoch time with milliseconds as well.
use Time::HiRes qw( gettimeofday ); ($seconds, $microseconds) = gettimeofday;