in reply to Debugging DBD/SQL syntax error

jhourcle's reply above is good for the general case... for your specific case here which appears to be a SQL problem and not a perl one, i would first debug/narrow it a little more. First, put in print $sql; and print join(":",@bind); debug statements (or use DBI's trace functionality) so you can test the sql directly in mysql. If the syntax error still isn't obvious, then try to knock the size down from 300 names to just 3 or so (i assume there's some loop-age to construct the statement so hopefully this is easy), and try to work w/the sql from there. Might be obvious once all the clutter is removed.. If it's still a problem, post it up! I'd recommend posting the smaller sample of what illustrates the issue -- even with <readmore> tags a INSERT statement w/300 names might not get as close a look as a concise version (and hopefully the problem will be easier for a reader to spot).