#!/usr/bin/perl -w
#

use strict;
use DBI;

my $database = "j";
my $host = 'localhost';
my $dsn = "DBI:mysql:$database:$host";
my $dbuser = "jpm";
my $dbpass = "toot";

my $dbh;
$dbh = DBI->connect( $dsn, $dbuser, $dbpass)
        or die "Can't connect to $dsn: $dbh->errstr\n";

my $ins = $dbh->prepare("INSERT INTO jp (name) VALUES (?)");


while (<>) {
	chomp;

	$ins->execute($_) or die "Unable to execute query: $dbh->errstr\n";

}
$ins->finish;
$dbh->disconnect;
exit;

