http://www.perlmonks.org?node_id=217356


in reply to DBI SQL statement in while loop

Your code snippet looks a little odd to me.
Maybe its a typo but wouldn't you want this:
while (<>) { my $quantity = param("quantity"); $quantity = $dbh->quote( $quantity ); my $gross_sales = param("gross_sales"); $gross_sales = $dbh->quote( $gross_sales ); my $sql2 = qq/ INSERT INTO transaction_details (quantity, gross_sales) VALU +ES ($quantity, convert (money, $gross_sales)) /; my $rv = $dbh->do( $sql2 ); }