in reply to Problem with MySql SELECT
You need to make sure your connects succeed, you are getting those errors because $dbhC is undef, because you didn't specify which CSV to open.