or download this
my $sql = 'UPDATE table SET '
. join (',', map {"$_=?"} @ffs)
. 'WHERE tbl.field=?';
# check the string '$sql' -- you used 'table' in the FROM, but 'tbl' i
+n the WHERE
my $sth = $db->prepare( $sql );
$sth->execute( @cols{@ffs}, $lname );