in reply to Trying to process some text...

It's as easy to process a text file line-by-line as it is to suck it into an array first. And line-by-line is more memory friendly. You'll find examples of the line-by-line idiom in nearly every Perl book you may chance to pick up.

Try something like this (and note the extra error handling):

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 ( <IN> ) { chomp; # remove the trailing \n my($operation, $seconds, $usr, $sys, $cpu, $tests) = split; $sth->execute($operation,$seconds,$usr,$sys,$cpu,$tests); } close(IN);
To get SQL errors reported, use {RaiseError => 1} when you make the connection. See the DBI doc for details.