#------------------------------ db operations sub execute_it { my ($dbh, $stmt) = @_; print "Content-type: text/html\n\n"; print "Here1".Dumper ($dbh, $stmt); $sth = $dbh->prepare($stmt); $sth->execute(); return ($sth); } Content-type: text/html Here1 $VAR1 = bless( {}, 'DBI::db' ); $VAR2 = 'LOAD DATA LOCAL INFILE "../file.csv" INTO TABLE table_name FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY """" LINES TERMINATED BY "\r" IGNORE 1 LINES '; sub close_db { my ($dbh, $sth) = shift; if ($sth) { $sth->finish(); $dbh->disconnect(); } }