##
my $sth = $dbh->prepare('INSERT INTO dickens VALUES(?, ?)');
# and then, as often as you want:
$sth->execute($line, $count);
####
CREATE TABLE dickens (
word VARCHAR(30),
line INTEGER,
);
####
foreach $word ( @theseWords ) {
my @lines = split m/ ,/, $Line{$word};
for (@lines){
$sth->execute($word, $_);
}
}