Did you try that SQL statement outside your script? I
mean, manually, from the mysql monitor?

Does the table structure correspond to the CVS
structure?

If the answer to all the above questions is "yes", then
I am prepared to accept that you might have a Perl
problem. Otherwise, I should address you to a a more appropriate
place where to ask your question.

Moreover, you are asking for a database related error,
and then you are showing us an uploading script.

Is that relevant?

If not, why don't you skim the example to the only thing
that matters?

to standardise all your line endings. You could use \r if you want but \n is the default, the standard .... and it's less typing in your LOAD DATA.

If that does not work then I suggest you use perl to read and validate the uploaded file before you pass it to mysql. I too suggest trying to load the file manually. You could download the file and try loading it into a local MySQL DB if you don't have access to the remote one.

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other