in reply to Re: variable type
in thread variable type

$dbh->quote_identifier is the portable version of escape_name

my $table = 'sometable'; my @cols = qw( id name ); my @vals = qw( 3 somename ); my $stmt = "INSERT INTO " . $dbh->quote_identifier($table) . " (" . join(', ', map { $dbh->quote_identifier($_) } @cols) . ") VALUES (" . join(', ', (?) x @cols) . ")"; my $sth = $dbh->prepare($stmt); $sth->execute(@vals);