while( my @results = $table_results->fetchrow_array()){ print join ",",@results; print "\n"; $sth_insert->execute(@results); }