in reply to Can't insert into for one column

You should be using placeholders.

You don't have quotes around your strings, so the db is interpreting cash (etc.) as column names. If you used placeholders instead of generating a new insert statement each time, you wouldn't have to worry about quoting.

Your code should look something like this (some error checking would probably be good to add):

my $insert_h = $dbh->prepare('INSERT INTO sales VALUES(?, ?, ?, ?, ?, +?)'); while (<DATA>) { $insert_h->execute(split); }

We're not really tightening our belts, it just feels that way because we're getting fatter.