use DBI;

$password="password";
$dbh = DBI->connect("DBI:mysql:nations", "randy", $password);

$dbh->do("drop table jasonprl;"); 
$dbh->do("create table jasonprl (Code1 char(2) not null, Code2 char(20) not
null, Length float(10,2));")
 || die "Unable to create table";

$sth=$dbh->prepare("Select * From borders");
$sth->execute();

while (($code1, $code2, $length)=$sth->fetchrow_array())
{

$sql = "insert into jasonprl values (\"$code1\",
\"$code2\",
$length);";
print "$sql\n";
$dbh->do($sql) || die "Unable to add to table";
}

$sth->finish();

$dbh->disconnect();
