$time=~s{ #$1 $2 $3 $4 $5 $6 $7 (\d+)/(\d+)/(\d+)\s+(\d+):(\d+):(\d+)\.(\d+) } { sprintf '%04d/%02d/%02d %02d:%02d:%02d.%3d', $1, $2, $3, $4, $5, $6, $7 }xe or die "Failed to normalize '$time'\n";