Can you show some example of the date/time strings that you are attempting to use? Also MySQL does have conversion routines. It is not clear to me that your Perl code is even necessary for entry into the DB.
Actually, it'd be best if you kept your original question in the root node and put your solution below it so others can learn from your question and the solution! The node How do I change/delete my post? goes into more detail.