open my $fh, "<", $fileToInsert or die "$filetoInsert: $!" my $csv = Text::CSV->new ({ binary => 1, auto_diag => 1, allow_white_space => 1, }); # I have to assume prepare () is a *function* in a singleton # instead of the method provided by DBI my $sth = prepare ( "insert into TAB1 (sample_date, server, n1, n2, command) values (?,?,?,?,?)"); while (my $row = $csv->getline ($fh)) { $sth->execute (@$row); }