in reply to Re: Re: Fast Building of SQL Statements
in thread Fast Building of SQL Statements

Yep, that's easy.
sub make_insert_func { my @PLACEHOLDERS = ('?') x @_; local $" = ','; my $SQL = "INSERT (@_) INTO foo VALUES (@PLACEHOLDERS)"; return sub { my $dbh = shift || return; my $sth = $dbh->prepare($SQL); $sth->execute(@_); $sth->finish; } }

Makeshifts last the longest.