my $sth = $dbh->prepare(q{INSERT INTO sales (product_code, qty, price) VALUES (?, ?, ?)}; $sth->execute($product, $qty, $price) or die $dbh->errstr;