in reply to Re^2: array/hash - reference and dereference
in thread array/hash - reference and dereference

It sounds like a lot more trouble than just making a mkinsert() function.

%ages = [...] # Finally filled in $sqlquery->execute(mkinsert(%ages));

You could store references to the hash elements into the array instead. But you'd have to explicitly dereference them, and it would mostly serve to confuse people reading the code. Why not make it simple?