A Simple Example
$dbh = DBI->connect('dbi:ODBC:PRICE', 'user', 'password',
{ RaiseError => 1, AutoCommit => 0 });
$upd = $dbh->prepare('UPDATE prices SET price=? WHERE prod=?');
$ins = $dbh->prepare('INSERT INTO prices(prod,price) VALUES (?,?)');
($prod, $price) = split /,/, $line;
$rows = $upd->execute($price, $prod);
$ins->execute($prod,$price) if $rows == 0;
Notes:
Very simple to learn and use.