in reply to Re: SQL INSERT creator
in thread SQL INSERT creator

Ouch, did you just change $" and pass that change on to DBI? What say you localize that a bit more local. =)
my $sql; { my @values = ('?') x @columns; # I love that, BTW... local $" = ','; $sql = "INSERT INTO $table (@columns) VALUES (@values)"; } $dbh->prepare($sql) or die("Couldn't prepare $sql " . $dbh->errstr);

Sure, the likelyhood of any of the DBI/DBD stuff using a string-interpolated array is pretty low but it is still bad practice.

--
$you = new YOU;
honk() if $you->love(perl)