in reply to Timestamp Format Help!

Using POSIX::strftime() is certainly the way to go... but here's what your get_timestamp() could have looked like — just in case you want to learn from what you did wrong.

sub get_timestamp { my ($sec,$min,$hour,$mday,$mon,$year) = localtime(time); return sprintf('%u-%02u-%02u %02u:%02u:%02u.000', $year+1900, $mon+1, $mday, $hour, $min, $sec); }