$dbh->do('BEGIN TRANSACTION'); my $sta=$dbh->prepare("INSERT INTO ISP(Store,Date) VALUES(?, ?)"); my $stb=$dbh->prepare("INSERT INTO UnityPrimary(Store,Date) VALUES(?, ?)"); my $stc=$dbh->prepare("INSERT INTO UnitySecondary(Store,Date) VALUES(? , ?)"); while (){ chomp; my($store,$isp,$pri,$sec)=split /,/; $sta->execute($store,$isp); $stb->execute($store,$pri); $stc->execute($store,$sec); } $dbh->('END TRANSACTION');