in reply to CSV to SQL?

I'd look into what bbfu says above first about an import facility for your database, and if there isn't any import facility, or if there's some filtering/munging that the import facility just doesn't provide that you want to do in perl (then again you can filter/munge and output another CSV file to import, which if its a large dataset, can be a faster way to do it), then you could look into the AnyData module (or another CSV module), and the insert_hash example from the latest DBI perldocs.