Just to (maybe, hopefully) clarify: if $columns contains an array ref with your 22 column names and $values the 22 corresponding values you need to call $sth->execute( @{$columns}, @{$values} ) because it expects to get a flat list of parameters (not references to arrays with them). You're giving it the first below; it wants the second:
$sth->execute( [ "col1", "col2", ... ], [ "val1", "val2", ... ] ); ##
+ not working
$sth->execute( "col1", "col2", ..., "col22", "val1", "val2", ... ); ##
+ what it expects
The cake is a lie.
The cake is a lie.
The cake is a lie.