"ct_get_data() takes 3 parameters: The column number (starting at 1) of the query, a scalar ref and a byte count. If the byte count is 0 then we read as many bytes as possible".
You did not pass a scalar ref, but instead just a scalar. Otherwise, you followed the docs to the tee. Try correcting that reference, and see if that makes a difference.