in reply to Unexplained flock() errors

Not sure I can help with the flock issue, but in general Perl 5.6.0 is a bit buggy and DBD::CSV is quite buggy. Try upgrading DBD::CSV and its dependents.

As I offered here 231494, if your just using DBD::CSV to do inserts you might try replacing that code by using Text::CSV_XS instead.