in reply to DBD::CSV Update

Some of the basic rules of relational databases say that you MUST have a field name for each of the fields and that all the records in the table must have an entry for each of the fields. SQL wrongly allows you to have "NULL" for some of these entries although that is abhorrent and will one day cause you trouble.

It therefore means that your "database file" is not in an acceptable format: the first row should be field names and nothing but field names and all other rows should be data and nothing but data. Anything else can only lead to problems and errors. Skipping some rows as Anonymous Monk suggests may save your bacon now but should only be considered as a stop-gap measure.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics