You cannot. My proposal only works for simple column names. Do you really need to pass the columns names? Can you not use
my $rs = $sth->fetchall_arrayref({});
without specifying the columns? According to the documentation it should work but I do not have your database to test it. This way everything would be controlled by your sql only.
In reply to Re^5: My doubts about using fetchall_arrayref
by hdb
in thread My doubts about using fetchall_arrayref
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |