in reply to Trying to process some text...

You're not splitting the lines up into an array. If I read your data correctly, split " "; will do that. I'd also recommend reading one line at a time from the flat file, and recommend a prepared $sth with placeholders. Something like this (I'll go ahead and use the password you gave, since you will change it, won't you? ):

#!/usr/bin/perl -w use strict; use DBI; my ($dbh,$sth,$count); $dbh = DBI->connect ("DBI:mysql:host=boognish;database=benchwarmer", "joda","waliays", {PrintError => 0, RaiseError => 1}); $sth = $dbi->prepare('INSERT INTO main (operations,seconds,usr,sys,cpu +,tests) VALUES (?,?,?,?,?,?)'); my $input_file = '/path/to/RUN-mysql-win2k.txt'; open(INFO, "< $input_file") or die $!; while (<INFO>) { # does parse to list and write to db in one swell foop $sth->execute( split " " ); } close INFO or die $!; $sth->finish; $dbi->disconnect;
In the read loop, split is working on it's default argument, $_, which is provided by while. That parsing assumes data has no whitespace and whitespace of some kind is the field delimeter. I've also added touches like warnings, strict and error checking. Those will assist you if you use them.

Update: Added finish and disconnect, corrected a typo.

After Compline,
Zaxo