or download this
my $data = qq(INSERT INTO temp (url, altavista, yahoo, msn, teoma, g
+oogle, alltheweb, Total) values("$url", "$altavista_results", "$yahoo
+_results", "$msn_results", "$teoma_results", "$google_results", "$all
+theweb_results", "$total") ON DUPLICATE KEY UPDATE altavista = "$alta
+vista_results", yahoo = "$yahoo_results", msn = "$msn_results", teoma
+ = "$teoma_results", google = "$google_results", alltheweb = "$allthe
+web_results", total = "$total");
my $sth = $dbh->prepare($data);
$sth->execute() or die $dbh->errstr;