in reply to Perl/SQL syntax error
My suggestion is to make your code print $insertData and then take that query and paste it into your command line tool for the database and debug it there.