my $sth = $dbh->prepare(<<"SQL"); INSERT INTO main (operations,seconds,usr,sys,cpu,tests) VALUE (?,?,?,?,?,?) SQL open(IN, "<$input_file") or die "$input_file: $!"; while ( ) { chomp; # remove the trailing \n my($operation, $seconds, $usr, $sys, $cpu, $tests) = split; $sth->execute($operation,$seconds,$usr,$sys,$cpu,$tests); } close(IN);