use SQL::Abstract; my $SQL = SQL::Abstract->new; ... my ($sql, @bind) = $SQL->insert ($table, \%h1); $dbh->do ($sql, {}, @bind);